@shapeshiftoss/caip 1.6.0 → 1.6.1
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/caip19/caip19.js +3 -2
- package/package.json +1 -1
package/dist/caip19/caip19.js
CHANGED
|
@@ -19,6 +19,7 @@ const toCAIP19 = ({ chain, network, contractType, tokenId }) => {
|
|
|
19
19
|
const caip2 = (0, caip2_1.toCAIP2)({ chain, network });
|
|
20
20
|
switch (chain) {
|
|
21
21
|
case types_1.ChainTypes.Ethereum: {
|
|
22
|
+
tokenId = tokenId === null || tokenId === void 0 ? void 0 : tokenId.toLowerCase();
|
|
22
23
|
if (contractType) {
|
|
23
24
|
if (!tokenId) {
|
|
24
25
|
throw new Error(`toCAIP19: no tokenId provided with contract type ${contractType}`);
|
|
@@ -106,12 +107,12 @@ const fromCAIP19 = (caip19) => {
|
|
|
106
107
|
}
|
|
107
108
|
case AssetNamespace.ERC20: {
|
|
108
109
|
const contractType = types_1.ContractTypes.ERC20;
|
|
109
|
-
const tokenId = referenceString;
|
|
110
|
+
const tokenId = referenceString.toLowerCase();
|
|
110
111
|
return { chain, network, contractType, tokenId };
|
|
111
112
|
}
|
|
112
113
|
case AssetNamespace.ERC721: {
|
|
113
114
|
const contractType = types_1.ContractTypes.ERC721;
|
|
114
|
-
const tokenId = referenceString;
|
|
115
|
+
const tokenId = referenceString.toLowerCase();
|
|
115
116
|
return { chain, network, contractType, tokenId };
|
|
116
117
|
}
|
|
117
118
|
}
|