@cryptorubic/core 0.3.8-id-990 → 0.3.8
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/package.json +1 -1
- package/src/lib/tokens/token.js +2 -3
package/package.json
CHANGED
package/src/lib/tokens/token.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.Token = void 0;
|
|
|
4
4
|
const bignumber_js_1 = require("bignumber.js");
|
|
5
5
|
const blockchains_info_1 = require("../blockchains/blockchains-info");
|
|
6
6
|
const wrapped_addresses_1 = require("../blockchains/wrapped-addresses");
|
|
7
|
+
const native_token_list_1 = require("./constants/native-token-list");
|
|
7
8
|
class Token {
|
|
8
9
|
/**
|
|
9
10
|
* Maps provided tokens to their addresses.
|
|
@@ -12,9 +13,7 @@ class Token {
|
|
|
12
13
|
return tokens.map((token) => token.address);
|
|
13
14
|
}
|
|
14
15
|
get isNative() {
|
|
15
|
-
const nativeAddress =
|
|
16
|
-
? 'So11111111111111111111111111111111111111111'
|
|
17
|
-
: '0x0000000000000000000000000000000000000000';
|
|
16
|
+
const nativeAddress = native_token_list_1.nativeTokensList[this.blockchain].address;
|
|
18
17
|
return nativeAddress.toLowerCase() === this.address.toLowerCase();
|
|
19
18
|
}
|
|
20
19
|
get isWrapped() {
|