@@ -46,53 +46,6 @@ describe('Asset metadata service', () => {
4646 coin . tokenContractAddress . should . equal ( '0x89a959b9184b4f8c8633646d5dfd049d2ebc983a' ) ;
4747 } ) ;
4848
49- describe ( 'ERC721 NFTs' , ( ) => {
50- it ( 'should create a custom coin factory from ams response' , async ( ) => {
51- bitgo . initCoinFactory ( reducedAmsTokenConfig ) ;
52- const coin = bitgo . coin ( 'erc721:unsteth' ) ;
53- should . exist ( coin ) ;
54- coin . type . should . equal ( 'erc721:unsteth' ) ;
55- coin . name . should . equal ( 'Lido: stETH Withdrawal NFT' ) ;
56- coin . decimalPlaces . should . equal ( 0 ) ;
57- coin . tokenContractAddress . should . equal ( '0x889edc2edab5f40e902b864ad4d7ade8e412f9b1' ) ;
58- } ) ;
59-
60- it ( 'should be able to register an nft in the coin factory' , ( ) => {
61- const nftName = 'terc721:unsteth' ;
62- bitgo . registerToken ( nftName ) ;
63- const coin = bitgo . coin ( nftName ) ;
64- should . exist ( coin ) ;
65- coin . type . should . equal ( nftName ) ;
66- coin . name . should . equal ( 'Test Lido: stETH Withdrawal NFT' ) ;
67- coin . decimalPlaces . should . equal ( 0 ) ;
68- coin . tokenContractAddress . should . equal ( '0xfe56573178f1bcdf53f01a6e9977670dcbbd9186' ) ;
69- } ) ;
70-
71- it ( 'should fetch all assets from AMS and initialize the coin factory' , async ( ) => {
72- const bitgo = TestBitGo . decorate ( BitGo , { env : 'mock' , microservicesUri, useAms : true } as BitGoOptions ) ;
73- bitgo . initializeTestVars ( ) ;
74-
75- // Setup nocks
76- nock ( microservicesUri ) . get ( '/api/v1/assets/list/testnet' ) . reply ( 200 , reducedAmsTokenConfig ) ;
77-
78- await bitgo . registerAllTokens ( ) ;
79- const coin = bitgo . coin ( 'terc721:unsteth' ) ;
80- should . exist ( coin ) ;
81- } ) ;
82-
83- it ( 'should fetch nft from default coin factory when useAms is false' , ( ) => {
84- const bitgoNoAms = TestBitGo . decorate ( BitGo , { env : 'mock' , microservicesUri, useAms : false } as BitGoOptions ) ;
85- bitgoNoAms . initializeTestVars ( ) ;
86- bitgoNoAms . initCoinFactory ( reducedAmsTokenConfig ) ;
87- const coin : any = bitgoNoAms . coin ( 'erc721:unsteth' ) ;
88- should . exist ( coin ) ;
89- coin . type . should . equal ( 'erc721:unsteth' ) ;
90- coin . name . should . equal ( 'Lido: stETH Withdrawal NFT' ) ;
91- coin . decimalPlaces . should . equal ( 0 ) ;
92- coin . tokenContractAddress . should . equal ( '0x889edc2edab5f40e902b864ad4d7ade8e412f9b1' ) ;
93- } ) ;
94- } ) ;
95-
9649 it ( 'should fetch all assets from AMS and initialize the coin factory' , async ( ) => {
9750 const bitgo = TestBitGo . decorate ( BitGo , { env : 'mock' , microservicesUri, useAms : true } as BitGoOptions ) ;
9851 bitgo . initializeTestVars ( ) ;
0 commit comments