@@ -2,7 +2,7 @@ import { BigNumber } from 'ethers'
22import { BaseSyntheticEvent , useState } from 'react'
33import { toast } from 'react-toastify'
44
5- import useWeb3Provider from '../hooks/useWeb3Provider '
5+ import { useWeb3Context } from '../context/Web3Context '
66import { CONTRACT_ADDRESS } from '../lib/config'
77import { transactionError } from '../lib/utils/errors'
88import { checkInputAddress , getContract , isCollectionNestable } from '../lib/utils'
@@ -13,7 +13,7 @@ interface MintNestableProps {
1313}
1414
1515export default function MintNestable ( { nftId } : MintNestableProps ) {
16- const { state, getSigner, refreshNfts } = useWeb3Provider ( )
16+ const { state, getPendingChildren , getSigner, refreshNfts } = useWeb3Context ( )
1717
1818 const [ loading , setLoading ] = useState ( false )
1919 const [ address , setAddress ] = useState ( '' )
@@ -49,6 +49,8 @@ export default function MintNestable({ nftId }: MintNestableProps) {
4949 toast ( 'Token minting has started' , { type : 'success' } )
5050
5151 await tx . wait ( )
52+
53+ getPendingChildren ( nftId )
5254 await refreshNfts ( nftContract )
5355 } catch ( e ) {
5456 transactionError ( 'Unsuccessful mint' , e )
@@ -84,6 +86,8 @@ export default function MintNestable({ nftId }: MintNestableProps) {
8486 toast ( 'Token minting has started' , { type : 'success' } )
8587
8688 await tx . wait ( )
89+
90+ getPendingChildren ( nftId )
8791 await refreshNfts ( childNftContract )
8892 } catch ( e ) {
8993 console . log ( e )
0 commit comments