Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions modules/bitgo/test/v2/resources/amsTokenConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,4 @@ export const reducedAmsTokenConfig = {
contractAddress: '0x89a959b9184b4f8c8633646d5dfd049d2ebc983a',
},
],
'terc721:unsteth': [
{
id: '49ff49ea-3355-4717-bbb0-5e8f5cae2201',
fullName: 'Test Lido: stETH Withdrawal NFT',
name: 'terc721:unsteth',
prefix: '',
suffix: '',
baseUnit: 'wei',
kind: 'crypto',
family: 'eth',
isToken: true,
additionalFeatures: [],
excludedFeatures: [],
decimalPlaces: 0,
asset: 'terc721:unsteth',
network: {
name: 'Hoodi',
},
contractAddress: '0xfe56573178f1bcdf53f01a6e9977670dcbbd9186',
},
],
};
47 changes: 0 additions & 47 deletions modules/bitgo/test/v2/unit/ams/ams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,53 +46,6 @@ describe('Asset metadata service', () => {
coin.tokenContractAddress.should.equal('0x89a959b9184b4f8c8633646d5dfd049d2ebc983a');
});

describe('ERC721 NFTs', () => {
it('should create a custom coin factory from ams response', async () => {
bitgo.initCoinFactory(reducedAmsTokenConfig);
const coin = bitgo.coin('erc721:unsteth');
should.exist(coin);
coin.type.should.equal('erc721:unsteth');
coin.name.should.equal('Lido: stETH Withdrawal NFT');
coin.decimalPlaces.should.equal(0);
coin.tokenContractAddress.should.equal('0x889edc2edab5f40e902b864ad4d7ade8e412f9b1');
});

it('should be able to register an nft in the coin factory', () => {
const nftName = 'terc721:unsteth';
bitgo.registerToken(nftName);
const coin = bitgo.coin(nftName);
should.exist(coin);
coin.type.should.equal(nftName);
coin.name.should.equal('Test Lido: stETH Withdrawal NFT');
coin.decimalPlaces.should.equal(0);
coin.tokenContractAddress.should.equal('0xfe56573178f1bcdf53f01a6e9977670dcbbd9186');
});

it('should fetch all assets from AMS and initialize the coin factory', async () => {
const bitgo = TestBitGo.decorate(BitGo, { env: 'mock', microservicesUri, useAms: true } as BitGoOptions);
bitgo.initializeTestVars();

// Setup nocks
nock(microservicesUri).get('/api/v1/assets/list/testnet').reply(200, reducedAmsTokenConfig);

await bitgo.registerAllTokens();
const coin = bitgo.coin('terc721:unsteth');
should.exist(coin);
});

it('should fetch nft from default coin factory when useAms is false', () => {
const bitgoNoAms = TestBitGo.decorate(BitGo, { env: 'mock', microservicesUri, useAms: false } as BitGoOptions);
bitgoNoAms.initializeTestVars();
bitgoNoAms.initCoinFactory(reducedAmsTokenConfig);
const coin: any = bitgoNoAms.coin('erc721:unsteth');
should.exist(coin);
coin.type.should.equal('erc721:unsteth');
coin.name.should.equal('Lido: stETH Withdrawal NFT');
coin.decimalPlaces.should.equal(0);
coin.tokenContractAddress.should.equal('0x889edc2edab5f40e902b864ad4d7ade8e412f9b1');
});
});

it('should fetch all assets from AMS and initialize the coin factory', async () => {
const bitgo = TestBitGo.decorate(BitGo, { env: 'mock', microservicesUri, useAms: true } as BitGoOptions);
bitgo.initializeTestVars();
Expand Down
14 changes: 0 additions & 14 deletions modules/statics/src/allCoinsAndTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3023,20 +3023,6 @@ export const allCoinsAndTokens = [
'',
Networks.test.hoodi
),
erc721(
'30d034ae-41fd-4da2-bbb2-05fe1e301108',
'erc721:unsteth',
'Lido: stETH Withdrawal NFT',
'0x889edc2edab5f40e902b864ad4d7ade8e412f9b1',
[...AccountCoin.DEFAULT_FEATURES, CoinFeature.RESTRICTED]
),
terc721(
'05ce9121-45e0-4e9c-941b-1aa95bedfcc5',
'terc721:unsteth',
'Test Lido: stETH Withdrawal NFT',
'0xfe56573178f1bcdf53f01a6e9977670dcbbd9186',
[...AccountCoin.DEFAULT_FEATURES, CoinFeature.RESTRICTED]
),
terc721(
'e795fc78-b8a7-47a1-8294-5ecbe8a74c3a',
'terc721:bitgoerc721',
Expand Down
4 changes: 0 additions & 4 deletions modules/statics/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2846,10 +2846,6 @@ export enum UnderlyingAsset {
'tsoneium:test721' = 'tsoneium:test721',
'tsoneium:test1155' = 'tsoneium:test1155',

// Lido ETH NFTs
'erc721:unsteth' = 'erc721:unsteth',
'terc721:unsteth' = 'terc721:unsteth',

// coredao mainnet tokens
'coredao:stcore' = 'coredao:stcore',

Expand Down