@weblock-wallet/sdk 0.1.55 → 0.1.56
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/index.cjs +22 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -4
- package/dist/index.d.ts +3 -4
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -104519,9 +104519,14 @@ var WalletService = class {
|
|
|
104519
104519
|
});
|
|
104520
104520
|
const network = await this.networkService.getCurrentNetwork();
|
|
104521
104521
|
const decimals = network?.decimals || DECIMALS.ETH;
|
|
104522
|
+
const formatted = TokenAmount.format(response.result, decimals);
|
|
104522
104523
|
return {
|
|
104523
104524
|
raw: response.result,
|
|
104524
|
-
|
|
104525
|
+
// aliases (helpful for apps that expect numeric fields)
|
|
104526
|
+
balanceWei: response.result,
|
|
104527
|
+
result: response.result,
|
|
104528
|
+
formatted,
|
|
104529
|
+
balance: formatted,
|
|
104525
104530
|
decimals,
|
|
104526
104531
|
symbol: network?.symbol || "ETH"
|
|
104527
104532
|
};
|
|
@@ -106841,6 +106846,22 @@ var KNOWN_NETWORKS = {
|
|
|
106841
106846
|
currencyDecimals: 18,
|
|
106842
106847
|
explorerUrl: "https://polygonscan.com",
|
|
106843
106848
|
isTestnet: false
|
|
106849
|
+
},
|
|
106850
|
+
43114: {
|
|
106851
|
+
chainId: 43114,
|
|
106852
|
+
currencySymbol: "AVAX",
|
|
106853
|
+
currencyName: "Avalanche",
|
|
106854
|
+
currencyDecimals: 18,
|
|
106855
|
+
explorerUrl: "https://snowtrace.io",
|
|
106856
|
+
isTestnet: false
|
|
106857
|
+
},
|
|
106858
|
+
43113: {
|
|
106859
|
+
chainId: 43113,
|
|
106860
|
+
currencySymbol: "AVAX",
|
|
106861
|
+
currencyName: "Avalanche Fuji",
|
|
106862
|
+
currencyDecimals: 18,
|
|
106863
|
+
explorerUrl: "https://testnet.snowtrace.io",
|
|
106864
|
+
isTestnet: true
|
|
106844
106865
|
}
|
|
106845
106866
|
};
|
|
106846
106867
|
var DEFAULT_NETWORK_PARAMS = {
|