diff --git a/modules/sdk-coin-apt/src/aptToken.ts b/modules/sdk-coin-apt/src/aptToken.ts index d8aaf936a0..5279534a3a 100644 --- a/modules/sdk-coin-apt/src/aptToken.ts +++ b/modules/sdk-coin-apt/src/aptToken.ts @@ -36,8 +36,8 @@ export class AptToken extends Apt { return this.tokenConfig.network; } - get fungibleAssestAddress(): string { - return this.tokenConfig.fungibleAssetAddress; + get assetId(): string { + return this.tokenConfig.assetId; } get decimalPlaces(): number { diff --git a/modules/sdk-coin-apt/test/unit/aptToken.ts b/modules/sdk-coin-apt/test/unit/aptToken.ts index ad1c4c7ca2..4cefc257bd 100644 --- a/modules/sdk-coin-apt/test/unit/aptToken.ts +++ b/modules/sdk-coin-apt/test/unit/aptToken.ts @@ -27,6 +27,7 @@ describe('Apt Tokens', function () { aptTokenCoin.name.should.equal('USD Tether'); aptTokenCoin.coin.should.equal('tapt'); aptTokenCoin.network.should.equal('Testnet'); + aptTokenCoin.assetId.should.equal('0xd5d0d561493ea2b9410f67da804653ae44e793c2423707d4f11edb2e38192050'); aptTokenCoin.decimalPlaces.should.equal(6); }); }); diff --git a/modules/statics/src/account.ts b/modules/statics/src/account.ts index 98cc5aaea1..b34c6dc0c9 100644 --- a/modules/statics/src/account.ts +++ b/modules/statics/src/account.ts @@ -112,7 +112,7 @@ export interface SuiCoinConstructorOptions extends AccountConstructorOptions { } export interface AptCoinConstructorOptions extends AccountConstructorOptions { - fungibleAssetAddress: string; + assetId: string; } type FiatCoinName = `fiat${string}` | `tfiat${string}`; @@ -466,13 +466,13 @@ export class SuiCoin extends AccountCoinToken { * */ export class AptCoin extends AccountCoinToken { - public fungibleAssetAddress: string; + public assetId: string; constructor(options: AptCoinConstructorOptions) { super({ ...options, }); - this.fungibleAssetAddress = options.fungibleAssetAddress; + this.assetId = options.assetId; } } @@ -2337,7 +2337,7 @@ export function tsuiToken( * @param name unique identifier of the token * @param fullName Complete human-readable name of the token * @param decimalPlaces Number of decimal places this token supports (divisibility exponent) - * @param fungibleAssetAddress Fungible asset address of this token + * @param assetId Asset Id of this token i.e. the unique identifier of the token for all tokens - fungible, non-fungible and legacy * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin. * @param prefix Optional token prefix. Defaults to empty string * @param suffix Optional token suffix. Defaults to token name. @@ -2350,7 +2350,7 @@ export function aptToken( name: string, fullName: string, decimalPlaces: number, - fungibleAssetAddress: string, + assetId: string, asset: UnderlyingAsset, features: CoinFeature[] = AccountCoin.DEFAULT_FEATURES, prefix = '', @@ -2364,7 +2364,7 @@ export function aptToken( name, fullName, network, - fungibleAssetAddress, + assetId, prefix, suffix, features, @@ -2384,7 +2384,7 @@ export function aptToken( * @param name unique identifier of the token * @param fullName Complete human-readable name of the token * @param decimalPlaces Number of decimal places this token supports (divisibility exponent) - * @param fungibleAssetAddress Fungible asset of this token + * @param assetId Asset Id of this token i.e. the unique identifier of the token for all tokens - fungible, non-fungible and legacy * @param asset Asset which this coin represents. This is the same for both mainnet and testnet variants of a coin. * @param prefix Optional token prefix. Defaults to empty string * @param suffix Optional token suffix. Defaults to token name. @@ -2397,7 +2397,7 @@ export function taptToken( name: string, fullName: string, decimalPlaces: number, - fungibleAssetAddress: string, + assetId: string, asset: UnderlyingAsset, features: CoinFeature[] = AccountCoin.DEFAULT_FEATURES, prefix = '', @@ -2410,7 +2410,7 @@ export function taptToken( name, fullName, decimalPlaces, - fungibleAssetAddress, + assetId, asset, features, prefix, diff --git a/modules/statics/src/coins.ts b/modules/statics/src/coins.ts index 38f5f369b2..721f334099 100644 --- a/modules/statics/src/coins.ts +++ b/modules/statics/src/coins.ts @@ -20525,14 +20525,14 @@ export const coins = CoinMap.fromCoins([ 'USD Tether', 6, '0x357b0b74bc833e95a115ad22604854d6b0fca151cecd94111770e5d6ffc9dc2b', - UnderlyingAsset['tapt:usdt'] + UnderlyingAsset['apt:usdt'] ), taptToken( '2695e728-96dd-46e6-9d01-bd0fdbe1ff38', 'tapt:usdt', 'USD Tether', 6, - '0x357b0b74bc833e95a115ad22604854d6b0fca151cecd94111770e5d6ffc9dc2b', + '0xd5d0d561493ea2b9410f67da804653ae44e793c2423707d4f11edb2e38192050', UnderlyingAsset['tapt:usdt'] ), fiat('3f89b1f5-4ada-49c0-a613-15e484d42426', 'fiatusd', 'US Dollar', Networks.main.fiat, 2, UnderlyingAsset.USD), diff --git a/modules/statics/src/tokenConfig.ts b/modules/statics/src/tokenConfig.ts index 4b99346401..424f091829 100644 --- a/modules/statics/src/tokenConfig.ts +++ b/modules/statics/src/tokenConfig.ts @@ -82,7 +82,7 @@ export type SuiTokenConfig = BaseNetworkConfig & { }; export type AptTokenConfig = BaseNetworkConfig & { - fungibleAssetAddress: string; + assetId: string; }; export interface Tokens { @@ -523,7 +523,7 @@ const formattedAptTokens = coins.reduce((acc: AptTokenConfig[], coin) => { coin: coin.network.type === NetworkType.MAINNET ? 'apt' : 'tapt', network: coin.network.type === NetworkType.MAINNET ? 'Mainnet' : 'Testnet', name: coin.fullName, - fungibleAssetAddress: coin.fungibleAssetAddress, + assetId: coin.assetId, decimalPlaces: coin.decimalPlaces, }); }