@xchainjs/xchain-thorchain 0.28.10 → 0.28.12
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/lib/client.d.ts +5 -1
- package/lib/index.esm.js +228 -229
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +228 -229
- package/lib/index.js.map +1 -1
- package/package.json +6 -6
package/lib/client.d.ts
CHANGED
|
@@ -127,6 +127,10 @@ declare class Client extends BaseXChainClient implements ThorchainClient, XChain
|
|
|
127
127
|
* Throws an error if phrase has not been set before
|
|
128
128
|
**/
|
|
129
129
|
getPubKey(index?: number): cosmosclient.PubKey;
|
|
130
|
+
/**
|
|
131
|
+
* @deprecated this function eventually will be removed use getAddressAsync instead
|
|
132
|
+
*/
|
|
133
|
+
getAddress(index?: number): string;
|
|
130
134
|
/**
|
|
131
135
|
* Get the current address.
|
|
132
136
|
*
|
|
@@ -134,7 +138,7 @@ declare class Client extends BaseXChainClient implements ThorchainClient, XChain
|
|
|
134
138
|
*
|
|
135
139
|
* @throws {Error} Thrown if phrase has not been set before. A phrase is needed to create a wallet and to derive an address from it.
|
|
136
140
|
*/
|
|
137
|
-
|
|
141
|
+
getAddressAsync(walletIndex?: number): Promise<Address>;
|
|
138
142
|
/**
|
|
139
143
|
* Validate the given address.
|
|
140
144
|
*
|
package/lib/index.esm.js
CHANGED
|
@@ -4408,153 +4408,146 @@ function asPromise(fn, ctx/*, varargs */) {
|
|
|
4408
4408
|
|
|
4409
4409
|
var base64$1 = {};
|
|
4410
4410
|
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
function requireBase64 () {
|
|
4414
|
-
if (hasRequiredBase64) return base64$1;
|
|
4415
|
-
hasRequiredBase64 = 1;
|
|
4416
|
-
(function (exports) {
|
|
4411
|
+
(function (exports) {
|
|
4417
4412
|
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4413
|
+
/**
|
|
4414
|
+
* A minimal base64 implementation for number arrays.
|
|
4415
|
+
* @memberof util
|
|
4416
|
+
* @namespace
|
|
4417
|
+
*/
|
|
4418
|
+
var base64 = exports;
|
|
4424
4419
|
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4420
|
+
/**
|
|
4421
|
+
* Calculates the byte length of a base64 encoded string.
|
|
4422
|
+
* @param {string} string Base64 encoded string
|
|
4423
|
+
* @returns {number} Byte length
|
|
4424
|
+
*/
|
|
4425
|
+
base64.length = function length(string) {
|
|
4426
|
+
var p = string.length;
|
|
4427
|
+
if (!p)
|
|
4428
|
+
return 0;
|
|
4429
|
+
var n = 0;
|
|
4430
|
+
while (--p % 4 > 1 && string.charAt(p) === "=")
|
|
4431
|
+
++n;
|
|
4432
|
+
return Math.ceil(string.length * 3) / 4 - n;
|
|
4433
|
+
};
|
|
4439
4434
|
|
|
4440
|
-
|
|
4441
|
-
|
|
4435
|
+
// Base64 encoding table
|
|
4436
|
+
var b64 = new Array(64);
|
|
4442
4437
|
|
|
4443
|
-
|
|
4444
|
-
|
|
4438
|
+
// Base64 decoding table
|
|
4439
|
+
var s64 = new Array(123);
|
|
4445
4440
|
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4441
|
+
// 65..90, 97..122, 48..57, 43, 47
|
|
4442
|
+
for (var i = 0; i < 64;)
|
|
4443
|
+
s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;
|
|
4449
4444
|
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4445
|
+
/**
|
|
4446
|
+
* Encodes a buffer to a base64 encoded string.
|
|
4447
|
+
* @param {Uint8Array} buffer Source buffer
|
|
4448
|
+
* @param {number} start Source start
|
|
4449
|
+
* @param {number} end Source end
|
|
4450
|
+
* @returns {string} Base64 encoded string
|
|
4451
|
+
*/
|
|
4452
|
+
base64.encode = function encode(buffer, start, end) {
|
|
4453
|
+
var parts = null,
|
|
4454
|
+
chunk = [];
|
|
4455
|
+
var i = 0, // output index
|
|
4456
|
+
j = 0, // goto index
|
|
4457
|
+
t; // temporary
|
|
4458
|
+
while (start < end) {
|
|
4459
|
+
var b = buffer[start++];
|
|
4460
|
+
switch (j) {
|
|
4461
|
+
case 0:
|
|
4462
|
+
chunk[i++] = b64[b >> 2];
|
|
4463
|
+
t = (b & 3) << 4;
|
|
4464
|
+
j = 1;
|
|
4465
|
+
break;
|
|
4466
|
+
case 1:
|
|
4467
|
+
chunk[i++] = b64[t | b >> 4];
|
|
4468
|
+
t = (b & 15) << 2;
|
|
4469
|
+
j = 2;
|
|
4470
|
+
break;
|
|
4471
|
+
case 2:
|
|
4472
|
+
chunk[i++] = b64[t | b >> 6];
|
|
4473
|
+
chunk[i++] = b64[b & 63];
|
|
4474
|
+
j = 0;
|
|
4475
|
+
break;
|
|
4476
|
+
}
|
|
4477
|
+
if (i > 8191) {
|
|
4478
|
+
(parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
|
|
4479
|
+
i = 0;
|
|
4480
|
+
}
|
|
4481
|
+
}
|
|
4482
|
+
if (j) {
|
|
4483
|
+
chunk[i++] = b64[t];
|
|
4484
|
+
chunk[i++] = 61;
|
|
4485
|
+
if (j === 1)
|
|
4486
|
+
chunk[i++] = 61;
|
|
4487
|
+
}
|
|
4488
|
+
if (parts) {
|
|
4489
|
+
if (i)
|
|
4490
|
+
parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
|
|
4491
|
+
return parts.join("");
|
|
4492
|
+
}
|
|
4493
|
+
return String.fromCharCode.apply(String, chunk.slice(0, i));
|
|
4494
|
+
};
|
|
4500
4495
|
|
|
4501
|
-
|
|
4496
|
+
var invalidEncoding = "invalid encoding";
|
|
4502
4497
|
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4498
|
+
/**
|
|
4499
|
+
* Decodes a base64 encoded string to a buffer.
|
|
4500
|
+
* @param {string} string Source string
|
|
4501
|
+
* @param {Uint8Array} buffer Destination buffer
|
|
4502
|
+
* @param {number} offset Destination offset
|
|
4503
|
+
* @returns {number} Number of bytes written
|
|
4504
|
+
* @throws {Error} If encoding is invalid
|
|
4505
|
+
*/
|
|
4506
|
+
base64.decode = function decode(string, buffer, offset) {
|
|
4507
|
+
var start = offset;
|
|
4508
|
+
var j = 0, // goto index
|
|
4509
|
+
t; // temporary
|
|
4510
|
+
for (var i = 0; i < string.length;) {
|
|
4511
|
+
var c = string.charCodeAt(i++);
|
|
4512
|
+
if (c === 61 && j > 1)
|
|
4513
|
+
break;
|
|
4514
|
+
if ((c = s64[c]) === undefined)
|
|
4515
|
+
throw Error(invalidEncoding);
|
|
4516
|
+
switch (j) {
|
|
4517
|
+
case 0:
|
|
4518
|
+
t = c;
|
|
4519
|
+
j = 1;
|
|
4520
|
+
break;
|
|
4521
|
+
case 1:
|
|
4522
|
+
buffer[offset++] = t << 2 | (c & 48) >> 4;
|
|
4523
|
+
t = c;
|
|
4524
|
+
j = 2;
|
|
4525
|
+
break;
|
|
4526
|
+
case 2:
|
|
4527
|
+
buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
|
|
4528
|
+
t = c;
|
|
4529
|
+
j = 3;
|
|
4530
|
+
break;
|
|
4531
|
+
case 3:
|
|
4532
|
+
buffer[offset++] = (t & 3) << 6 | c;
|
|
4533
|
+
j = 0;
|
|
4534
|
+
break;
|
|
4535
|
+
}
|
|
4536
|
+
}
|
|
4537
|
+
if (j === 1)
|
|
4538
|
+
throw Error(invalidEncoding);
|
|
4539
|
+
return offset - start;
|
|
4540
|
+
};
|
|
4546
4541
|
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
return base64$1;
|
|
4557
|
-
}
|
|
4542
|
+
/**
|
|
4543
|
+
* Tests if the specified string appears to be base64 encoded.
|
|
4544
|
+
* @param {string} string String to test
|
|
4545
|
+
* @returns {boolean} `true` if probably base64 encoded, otherwise false
|
|
4546
|
+
*/
|
|
4547
|
+
base64.test = function test(string) {
|
|
4548
|
+
return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);
|
|
4549
|
+
};
|
|
4550
|
+
} (base64$1));
|
|
4558
4551
|
|
|
4559
4552
|
var eventemitter;
|
|
4560
4553
|
var hasRequiredEventemitter;
|
|
@@ -4983,21 +4976,29 @@ function requireFloat () {
|
|
|
4983
4976
|
return float;
|
|
4984
4977
|
}
|
|
4985
4978
|
|
|
4986
|
-
var inquire_1
|
|
4979
|
+
var inquire_1;
|
|
4980
|
+
var hasRequiredInquire;
|
|
4981
|
+
|
|
4982
|
+
function requireInquire () {
|
|
4983
|
+
if (hasRequiredInquire) return inquire_1;
|
|
4984
|
+
hasRequiredInquire = 1;
|
|
4985
|
+
inquire_1 = inquire;
|
|
4987
4986
|
|
|
4988
|
-
/**
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
function inquire(moduleName) {
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
4987
|
+
/**
|
|
4988
|
+
* Requires a module only if available.
|
|
4989
|
+
* @memberof util
|
|
4990
|
+
* @param {string} moduleName Module to require
|
|
4991
|
+
* @returns {?Object} Required module if available and not empty, otherwise `null`
|
|
4992
|
+
*/
|
|
4993
|
+
function inquire(moduleName) {
|
|
4994
|
+
try {
|
|
4995
|
+
var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval
|
|
4996
|
+
if (mod && (mod.length || Object.keys(mod).length))
|
|
4997
|
+
return mod;
|
|
4998
|
+
} catch (e) {} // eslint-disable-line no-empty
|
|
4999
|
+
return null;
|
|
5000
|
+
}
|
|
5001
|
+
return inquire_1;
|
|
5001
5002
|
}
|
|
5002
5003
|
|
|
5003
5004
|
var utf8$2 = {};
|
|
@@ -5116,60 +5117,52 @@ function requireUtf8 () {
|
|
|
5116
5117
|
return utf8$2;
|
|
5117
5118
|
}
|
|
5118
5119
|
|
|
5119
|
-
var pool_1;
|
|
5120
|
-
var hasRequiredPool;
|
|
5121
|
-
|
|
5122
|
-
function requirePool () {
|
|
5123
|
-
if (hasRequiredPool) return pool_1;
|
|
5124
|
-
hasRequiredPool = 1;
|
|
5125
|
-
pool_1 = pool;
|
|
5120
|
+
var pool_1 = pool;
|
|
5126
5121
|
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5122
|
+
/**
|
|
5123
|
+
* An allocator as used by {@link util.pool}.
|
|
5124
|
+
* @typedef PoolAllocator
|
|
5125
|
+
* @type {function}
|
|
5126
|
+
* @param {number} size Buffer size
|
|
5127
|
+
* @returns {Uint8Array} Buffer
|
|
5128
|
+
*/
|
|
5134
5129
|
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5130
|
+
/**
|
|
5131
|
+
* A slicer as used by {@link util.pool}.
|
|
5132
|
+
* @typedef PoolSlicer
|
|
5133
|
+
* @type {function}
|
|
5134
|
+
* @param {number} start Start offset
|
|
5135
|
+
* @param {number} end End offset
|
|
5136
|
+
* @returns {Uint8Array} Buffer slice
|
|
5137
|
+
* @this {Uint8Array}
|
|
5138
|
+
*/
|
|
5144
5139
|
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
}
|
|
5172
|
-
return pool_1;
|
|
5140
|
+
/**
|
|
5141
|
+
* A general purpose buffer pool.
|
|
5142
|
+
* @memberof util
|
|
5143
|
+
* @function
|
|
5144
|
+
* @param {PoolAllocator} alloc Allocator
|
|
5145
|
+
* @param {PoolSlicer} slice Slicer
|
|
5146
|
+
* @param {number} [size=8192] Slab size
|
|
5147
|
+
* @returns {PoolAllocator} Pooled allocator
|
|
5148
|
+
*/
|
|
5149
|
+
function pool(alloc, slice, size) {
|
|
5150
|
+
var SIZE = size || 8192;
|
|
5151
|
+
var MAX = SIZE >>> 1;
|
|
5152
|
+
var slab = null;
|
|
5153
|
+
var offset = SIZE;
|
|
5154
|
+
return function pool_alloc(size) {
|
|
5155
|
+
if (size < 1 || size > MAX)
|
|
5156
|
+
return alloc(size);
|
|
5157
|
+
if (offset + size > SIZE) {
|
|
5158
|
+
slab = alloc(SIZE);
|
|
5159
|
+
offset = 0;
|
|
5160
|
+
}
|
|
5161
|
+
var buf = slice.call(slab, offset, offset += size);
|
|
5162
|
+
if (offset & 7) // align to 32 bit
|
|
5163
|
+
offset = (offset | 7) + 1;
|
|
5164
|
+
return buf;
|
|
5165
|
+
};
|
|
5173
5166
|
}
|
|
5174
5167
|
|
|
5175
5168
|
var longbits;
|
|
@@ -5392,7 +5385,7 @@ function requireMinimal () {
|
|
|
5392
5385
|
util.asPromise = aspromise;
|
|
5393
5386
|
|
|
5394
5387
|
// converts to / from base64 encoded strings
|
|
5395
|
-
util.base64 =
|
|
5388
|
+
util.base64 = base64$1;
|
|
5396
5389
|
|
|
5397
5390
|
// base class of rpc.Service
|
|
5398
5391
|
util.EventEmitter = requireEventemitter();
|
|
@@ -5401,13 +5394,13 @@ function requireMinimal () {
|
|
|
5401
5394
|
util.float = requireFloat();
|
|
5402
5395
|
|
|
5403
5396
|
// requires modules optionally and hides the call from bundlers
|
|
5404
|
-
util.inquire =
|
|
5397
|
+
util.inquire = requireInquire();
|
|
5405
5398
|
|
|
5406
5399
|
// converts to / from utf8 encoded strings
|
|
5407
5400
|
util.utf8 = requireUtf8();
|
|
5408
5401
|
|
|
5409
5402
|
// provides a node-like buffer pool in the browser
|
|
5410
|
-
util.pool =
|
|
5403
|
+
util.pool = pool_1;
|
|
5411
5404
|
|
|
5412
5405
|
// utility to work with the low and high bits of a 64 bit value
|
|
5413
5406
|
util.LongBits = requireLongbits();
|
|
@@ -10140,7 +10133,7 @@ class Client extends BaseXChainClient {
|
|
|
10140
10133
|
const messageAction = undefined;
|
|
10141
10134
|
const offset = (params === null || params === void 0 ? void 0 : params.offset) || 0;
|
|
10142
10135
|
const limit = (params === null || params === void 0 ? void 0 : params.limit) || 10;
|
|
10143
|
-
const address = (params === null || params === void 0 ? void 0 : params.address) || this.
|
|
10136
|
+
const address = (params === null || params === void 0 ? void 0 : params.address) || (yield this.getAddressAsync());
|
|
10144
10137
|
const txMinHeight = undefined;
|
|
10145
10138
|
const txMaxHeight = undefined;
|
|
10146
10139
|
if (limit + offset > MAX_PAGES_PER_FUNCTION_CALL * MAX_TX_COUNT_PER_PAGE) {
|
|
@@ -10346,11 +10339,7 @@ class Client extends BaseXChainClient {
|
|
|
10346
10339
|
return privKey.pubKey();
|
|
10347
10340
|
}
|
|
10348
10341
|
/**
|
|
10349
|
-
*
|
|
10350
|
-
*
|
|
10351
|
-
* @returns {Address} The current address.
|
|
10352
|
-
*
|
|
10353
|
-
* @throws {Error} Thrown if phrase has not been set before. A phrase is needed to create a wallet and to derive an address from it.
|
|
10342
|
+
* @deprecated this function eventually will be removed use getAddressAsync instead
|
|
10354
10343
|
*/
|
|
10355
10344
|
getAddress(index = 0) {
|
|
10356
10345
|
const address = this.cosmosClient.getAddressFromMnemonic(this.phrase, this.getFullDerivationPath(index));
|
|
@@ -10359,6 +10348,18 @@ class Client extends BaseXChainClient {
|
|
|
10359
10348
|
}
|
|
10360
10349
|
return address;
|
|
10361
10350
|
}
|
|
10351
|
+
/**
|
|
10352
|
+
* Get the current address.
|
|
10353
|
+
*
|
|
10354
|
+
* @returns {Address} The current address.
|
|
10355
|
+
*
|
|
10356
|
+
* @throws {Error} Thrown if phrase has not been set before. A phrase is needed to create a wallet and to derive an address from it.
|
|
10357
|
+
*/
|
|
10358
|
+
getAddressAsync(walletIndex = 0) {
|
|
10359
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10360
|
+
return this.getAddress(walletIndex);
|
|
10361
|
+
});
|
|
10362
|
+
}
|
|
10362
10363
|
/**
|
|
10363
10364
|
* Validate the given address.
|
|
10364
10365
|
*
|
|
@@ -10404,21 +10405,19 @@ class Client extends BaseXChainClient {
|
|
|
10404
10405
|
}
|
|
10405
10406
|
catch (error) {
|
|
10406
10407
|
for (const fallback of FallBackUrls) {
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
|
|
10415
|
-
|
|
10416
|
-
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
// Handle specific error if needed
|
|
10421
|
-
}
|
|
10408
|
+
try {
|
|
10409
|
+
const networkObj = fallback[this.network];
|
|
10410
|
+
const clientUrl = networkObj.node;
|
|
10411
|
+
const cosmosClient = new CosmosSDKClient({
|
|
10412
|
+
server: Array.isArray(clientUrl) ? clientUrl[0] : clientUrl,
|
|
10413
|
+
chainId: this.getChainId(this.network),
|
|
10414
|
+
prefix: getPrefix(this.network),
|
|
10415
|
+
});
|
|
10416
|
+
const tx = yield cosmosClient.txsHashGet(txId);
|
|
10417
|
+
return tx;
|
|
10418
|
+
}
|
|
10419
|
+
catch (error) {
|
|
10420
|
+
// Handle specific error if needed
|
|
10422
10421
|
}
|
|
10423
10422
|
}
|
|
10424
10423
|
return null;
|
|
@@ -10644,7 +10643,7 @@ class Client extends BaseXChainClient {
|
|
|
10644
10643
|
}
|
|
10645
10644
|
const privKey = this.getPrivateKey(walletIndex);
|
|
10646
10645
|
const signerPubkey = privKey.pubKey();
|
|
10647
|
-
const fromAddress = this.
|
|
10646
|
+
const fromAddress = yield this.getAddressAsync(walletIndex);
|
|
10648
10647
|
const fromAddressAcc = cosmosclient.AccAddress.fromString(fromAddress);
|
|
10649
10648
|
const depositTxBody = yield buildDepositTx({
|
|
10650
10649
|
msgNativeTx: {
|
|
@@ -10759,7 +10758,7 @@ class Client extends BaseXChainClient {
|
|
|
10759
10758
|
}
|
|
10760
10759
|
}
|
|
10761
10760
|
const txBody = yield buildTransferTx({
|
|
10762
|
-
fromAddress: this.
|
|
10761
|
+
fromAddress: yield this.getAddressAsync(walletIndex),
|
|
10763
10762
|
toAddress: recipient,
|
|
10764
10763
|
memo,
|
|
10765
10764
|
assetAmount: amount,
|