@rango-dev/queue-manager-rango-preset 0.1.10-next.90 → 0.1.10-next.92
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/dist/actions/createTransaction.d.ts.map +1 -1
- package/dist/helpers.d.ts +2 -1
- package/dist/helpers.d.ts.map +1 -1
- package/dist/queue-manager-rango-preset.cjs.development.js +41 -4
- package/dist/queue-manager-rango-preset.cjs.development.js.map +1 -1
- package/dist/queue-manager-rango-preset.cjs.production.min.js +1 -1
- package/dist/queue-manager-rango-preset.cjs.production.min.js.map +1 -1
- package/dist/queue-manager-rango-preset.esm.js +41 -4
- package/dist/queue-manager-rango-preset.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/actions/createTransaction.ts +5 -1
- package/src/helpers.ts +21 -0
|
@@ -1900,6 +1900,43 @@ function retryOn(wallet_network, manager, options) {
|
|
|
1900
1900
|
function isNeedBlockQueueForParallel(step) {
|
|
1901
1901
|
return !!step.evmTransaction || !!step.evmApprovalTransaction || !!step.cosmosTransaction;
|
|
1902
1902
|
}
|
|
1903
|
+
/*
|
|
1904
|
+
Create transaction endpoint doesn't return error code on http status code,
|
|
1905
|
+
For backward compatibilty with server and sdk, we use this wrapper to reject the promise.
|
|
1906
|
+
*/
|
|
1907
|
+
function throwOnOK(_x7) {
|
|
1908
|
+
return _throwOnOK.apply(this, arguments);
|
|
1909
|
+
}
|
|
1910
|
+
function _throwOnOK() {
|
|
1911
|
+
_throwOnOK = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(rawResponse) {
|
|
1912
|
+
var responseBody;
|
|
1913
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
1914
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
1915
|
+
case 0:
|
|
1916
|
+
_context3.prev = 0;
|
|
1917
|
+
_context3.next = 3;
|
|
1918
|
+
return rawResponse;
|
|
1919
|
+
case 3:
|
|
1920
|
+
responseBody = _context3.sent;
|
|
1921
|
+
if (!(!responseBody.ok || !responseBody.transaction)) {
|
|
1922
|
+
_context3.next = 6;
|
|
1923
|
+
break;
|
|
1924
|
+
}
|
|
1925
|
+
throw PrettyError.CreateTransaction(responseBody.error || 'bad response from create tx endpoint');
|
|
1926
|
+
case 6:
|
|
1927
|
+
return _context3.abrupt("return", responseBody);
|
|
1928
|
+
case 9:
|
|
1929
|
+
_context3.prev = 9;
|
|
1930
|
+
_context3.t0 = _context3["catch"](0);
|
|
1931
|
+
throw _context3.t0;
|
|
1932
|
+
case 12:
|
|
1933
|
+
case "end":
|
|
1934
|
+
return _context3.stop();
|
|
1935
|
+
}
|
|
1936
|
+
}, _callee3, null, [[0, 9]]);
|
|
1937
|
+
}));
|
|
1938
|
+
return _throwOnOK.apply(this, arguments);
|
|
1939
|
+
}
|
|
1903
1940
|
|
|
1904
1941
|
var INTERVAL_FOR_CHECK = 2000;
|
|
1905
1942
|
/**
|
|
@@ -2139,7 +2176,7 @@ function createTransaction(_x) {
|
|
|
2139
2176
|
}
|
|
2140
2177
|
function _createTransaction() {
|
|
2141
2178
|
_createTransaction = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(actions) {
|
|
2142
|
-
var setStorage, getStorage, next, schedule, context, swap, currentStep, evmTransaction, cosmosTransaction, transferTransaction, evmApprovalTransaction, solanaTransaction, tronTransaction, tronApprovalTransaction, starknetTransaction, starknetApprovalTransaction, request, _yield$
|
|
2179
|
+
var setStorage, getStorage, next, schedule, context, swap, currentStep, evmTransaction, cosmosTransaction, transferTransaction, evmApprovalTransaction, solanaTransaction, tronTransaction, tronApprovalTransaction, starknetTransaction, starknetApprovalTransaction, request, _yield$throwOnOK, transaction, _prettifyErrorMessage, extraMessage, extraMessageDetail, updateResult;
|
|
2143
2180
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2144
2181
|
while (1) switch (_context.prev = _context.next) {
|
|
2145
2182
|
case 0:
|
|
@@ -2165,10 +2202,10 @@ function _createTransaction() {
|
|
|
2165
2202
|
};
|
|
2166
2203
|
_context.prev = 6;
|
|
2167
2204
|
_context.next = 9;
|
|
2168
|
-
return httpService.createTransaction(request);
|
|
2205
|
+
return throwOnOK(httpService.createTransaction(request));
|
|
2169
2206
|
case 9:
|
|
2170
|
-
_yield$
|
|
2171
|
-
transaction = _yield$
|
|
2207
|
+
_yield$throwOnOK = _context.sent;
|
|
2208
|
+
transaction = _yield$throwOnOK.transaction;
|
|
2172
2209
|
if (transaction) {
|
|
2173
2210
|
if (isEvmTransaction(transaction)) {
|
|
2174
2211
|
if (transaction.isApprovalTx) currentStep.evmApprovalTransaction = transaction;else currentStep.evmTransaction = transaction;
|