@pioneer-platform/pioneer-balance 8.3.41 → 8.3.43
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/index.js +4 -4
- package/package.json +1 -1
package/lib/index.js
CHANGED
@@ -69,7 +69,7 @@ exports.UTXO_SUPPORT = [
|
|
69
69
|
];
|
70
70
|
exports.TENDERMINT_SUPPORT = [
|
71
71
|
'cosmos:mayachain-mainnet-v1/slip44:931',
|
72
|
-
'cosmos:mayachain-mainnet-v1/
|
72
|
+
'cosmos:mayachain-mainnet-v1/denom:maya', // Maya token support
|
73
73
|
'cosmos:osmosis-1/slip44:118',
|
74
74
|
'cosmos:cosmoshub-4/slip44:118',
|
75
75
|
'cosmos:kaiyo-1/slip44:118',
|
@@ -234,7 +234,7 @@ var Balance = /** @class */ (function () {
|
|
234
234
|
console.log(tag, 'asset.balance: ', asset.balance);
|
235
235
|
_c.label = 6;
|
236
236
|
case 6:
|
237
|
-
if (!(asset.caip === 'cosmos:mayachain-mainnet-v1/
|
237
|
+
if (!(asset.caip === 'cosmos:mayachain-mainnet-v1/denom:maya')) return [3 /*break*/, 8];
|
238
238
|
return [4 /*yield*/, this.networks.networks.mayachain.getBalances(pubkey.pubkey)];
|
239
239
|
case 7:
|
240
240
|
result = _c.sent();
|
@@ -242,8 +242,8 @@ var Balance = /** @class */ (function () {
|
|
242
242
|
mayaBalance = result.find(function (balance) { return balance.denom === 'maya'; });
|
243
243
|
if (mayaBalance) {
|
244
244
|
// Maya network already converts the amount, so use the decimal value directly
|
245
|
-
asset.balance = mayaBalance.amount.toString();
|
246
|
-
console.log(tag, 'MAYA token balance found: ', asset.balance);
|
245
|
+
asset.balance = mayaBalance.amount ? mayaBalance.amount.toString() : "0";
|
246
|
+
console.log(tag, 'MAYA token balance found: ', asset.balance, 'from object:', mayaBalance);
|
247
247
|
}
|
248
248
|
else {
|
249
249
|
asset.balance = "0";
|