@alephium/web3 1.2.1-rc.0 → 1.2.2

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.
@@ -154,10 +154,10 @@ class NodeProvider {
154
154
  };
155
155
  this.guessStdTokenType = async (tokenId) => {
156
156
  const interfaceId = await this.guessStdInterfaceId(tokenId);
157
- switch (interfaceId) {
158
- case types_1.StdInterfaceIds.FungibleToken:
157
+ switch (true) {
158
+ case interfaceId?.startsWith(types_1.StdInterfaceIds.FungibleToken):
159
159
  return 'fungible';
160
- case types_1.StdInterfaceIds.NFT:
160
+ case interfaceId?.startsWith(types_1.StdInterfaceIds.NFT):
161
161
  return 'non-fungible';
162
162
  default:
163
163
  return undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alephium/web3",
3
- "version": "1.2.1-rc.0",
3
+ "version": "1.2.2",
4
4
  "description": "A JS/TS library to interact with the Alephium platform",
5
5
  "license": "GPL",
6
6
  "main": "dist/src/index.js",
@@ -236,10 +236,10 @@ export class NodeProvider implements NodeProviderApis {
236
236
 
237
237
  guessStdTokenType = async (tokenId: HexString): Promise<'fungible' | 'non-fungible' | undefined> => {
238
238
  const interfaceId = await this.guessStdInterfaceId(tokenId)
239
- switch (interfaceId) {
240
- case StdInterfaceIds.FungibleToken:
239
+ switch (true) {
240
+ case interfaceId?.startsWith(StdInterfaceIds.FungibleToken):
241
241
  return 'fungible'
242
- case StdInterfaceIds.NFT:
242
+ case interfaceId?.startsWith(StdInterfaceIds.NFT):
243
243
  return 'non-fungible'
244
244
  default:
245
245
  return undefined