contracts update

This commit is contained in:
Michel Fromme
2023-07-27 15:34:07 +02:00
parent 5157308745
commit 650df134d2
12 changed files with 14369 additions and 16715 deletions
+3 -3
View File
@@ -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) {