@kimafinance/kima-transaction-api 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +10 -3
- package/package.json +1 -1
- package/src/index.ts +10 -3
package/build/index.js
CHANGED
|
@@ -99,6 +99,7 @@ async function submitKimaTransaction({ originChain, originAddress, targetChain,
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
+
await sleep(5000);
|
|
102
103
|
const msgSetHash = await client.msgSetTxHash({
|
|
103
104
|
creator: firstAccount.address,
|
|
104
105
|
txId,
|
|
@@ -108,9 +109,15 @@ async function submitKimaTransaction({ originChain, originAddress, targetChain,
|
|
|
108
109
|
console.log(msgSetHash);
|
|
109
110
|
let hashResult;
|
|
110
111
|
do {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
try {
|
|
113
|
+
hashResult = await client.signAndBroadcast([msgSetHash]);
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
console.log(error);
|
|
117
|
+
await sleep(5000);
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
} while (hashResult?.code !== 0);
|
|
114
121
|
return result;
|
|
115
122
|
}
|
|
116
123
|
exports.submitKimaTransaction = submitKimaTransaction;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kimafinance/kima-transaction-api",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.6",
|
|
4
4
|
"description": "A wrapper around Kima's API, enabling sending and monitoring transactions (Beta version)",
|
|
5
5
|
"repository": "https://github.com/kima-finance/kima-transaction-api",
|
|
6
6
|
"author": "",
|
package/src/index.ts
CHANGED
|
@@ -180,6 +180,8 @@ export async function submitKimaTransaction({
|
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
+
await sleep(5000);
|
|
184
|
+
|
|
183
185
|
const msgSetHash = await client.msgSetTxHash({
|
|
184
186
|
creator: firstAccount.address,
|
|
185
187
|
txId,
|
|
@@ -191,9 +193,14 @@ export async function submitKimaTransaction({
|
|
|
191
193
|
|
|
192
194
|
let hashResult;
|
|
193
195
|
do {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
196
|
+
try {
|
|
197
|
+
hashResult = await client.signAndBroadcast([msgSetHash]);
|
|
198
|
+
} catch (error) {
|
|
199
|
+
console.log(error);
|
|
200
|
+
await sleep(5000);
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
} while (hashResult?.code !== 0);
|
|
197
204
|
|
|
198
205
|
return result;
|
|
199
206
|
}
|