@@ -57,29 +57,29 @@ export const WipeSingle = ({
5757 const onSubmit = async ( { tokenId, account } : z . infer < typeof formSchema > ) => {
5858 try {
5959 // TODO: replace with useElven useApiCall when ready to handle such cases
60- const tokenOnNetwork = await axios . get < { nonce : number ; ticker : string } > (
61- ` ${ apiAddress } /nfts/ ${ tokenId . trim ( ) } ` ,
62- {
63- headers : {
64- 'Content-Type' : 'application/json' ,
65- Accept : 'application/json' ,
66- } ,
67- }
68- ) ;
60+ const tokenOnNetwork = await axios . get < {
61+ nonce : number ;
62+ collection : string ;
63+ } > ( ` ${ apiAddress } /nfts/ ${ tokenId . trim ( ) } ` , {
64+ headers : {
65+ 'Content-Type' : 'application/json' ,
66+ Accept : 'application/json' ,
67+ } ,
68+ } ) ;
6969
7070 const nonce = tokenOnNetwork ?. data ?. nonce ;
71- const collectionTicker = tokenOnNetwork ?. data ?. ticker ;
71+ const collectionId = tokenOnNetwork ?. data ?. collection ;
7272
7373 // TODO: show the error in the transaction status modal
74- if ( ! nonce || ! collectionTicker ) {
74+ if ( ! nonce || ! collectionId ) {
7575 console . error (
76- "Can't read the nonce or/and collection ticker of the token, using MultiversX API!"
76+ "Can't read the nonce or/and collection id of the token, using MultiversX API!"
7777 ) ;
7878 return ;
7979 }
8080
8181 const args : TypedValue [ ] = [
82- BytesValue . fromUTF8 ( collectionTicker . trim ( ) ) ,
82+ BytesValue . fromUTF8 ( collectionId . trim ( ) ) ,
8383 new BigUIntValue ( new BigNumber ( nonce ) ) ,
8484 new AddressValue ( new Address ( account . trim ( ) ) ) ,
8585 ] ;
@@ -101,7 +101,7 @@ export const WipeSingle = ({
101101 close ( ) ;
102102 } catch ( e ) {
103103 console . error (
104- "Can't read the nonce or/and collection ticker of the token, using MultiversX API!" ,
104+ "Can't read the nonce or/and collection id of the token, using MultiversX API!" ,
105105 e
106106 ) ;
107107 }
0 commit comments