contracts update
This commit is contained in:
@@ -78,9 +78,8 @@ export const useTokenStore = defineStore("token", {
|
||||
token.contract = getContract({
|
||||
address: token.contractAddress,
|
||||
abi: token.abi,
|
||||
PublicClient: walletStore.publicClient,
|
||||
WalletClient: walletStore.walletClient
|
||||
});
|
||||
WalletClient: walletStore.walletClient || walletStore.publicClient,
|
||||
});
|
||||
contracts.push({...token.contract, functionName: "decimals"})
|
||||
|
||||
}
|
||||
@@ -137,6 +136,7 @@ export const useTokenStore = defineStore("token", {
|
||||
const decimals = this.activeToken.decimals;
|
||||
|
||||
allowance = BigInt(allowance / BigInt(Math.pow(10, decimals)));
|
||||
console.log("allowance", allowance);
|
||||
return allowance;
|
||||
},
|
||||
async approveToken(amount) {
|
||||
|
||||
Reference in New Issue
Block a user