Skip to content

Commit 8d477f6

Browse files
Fix return type of allowance ERC20 calls
1 parent b9d220d commit 8d477f6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Assets/Thirdweb/Scripts/ERC20.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ public async Task<CurrencyValue> BalanceOf(string address)
5555
/// <summary>
5656
/// Get how much allowance the given address is allowed to spend on behalf of the connected wallet
5757
/// </summary>
58-
public async Task<string> Allowance(string spender)
58+
public async Task<CurrencyValue> Allowance(string spender)
5959
{
60-
return await Bridge.InvokeRoute<string>(getRoute("allowance"), Utils.ToJsonStringArray(spender));
60+
return await Bridge.InvokeRoute<CurrencyValue>(getRoute("allowance"), Utils.ToJsonStringArray(spender));
6161
}
6262

6363
/// <summary>
6464
/// Get how much allowance the given address is allowed to spend on behalf of the specified wallet
6565
/// </summary>
66-
public async Task<string> AllowanceOf(string owner, string spender)
66+
public async Task<CurrencyValue> AllowanceOf(string owner, string spender)
6767
{
68-
return await Bridge.InvokeRoute<string>(getRoute("allowanceOf"), Utils.ToJsonStringArray(owner, spender));
68+
return await Bridge.InvokeRoute<CurrencyValue>(getRoute("allowanceOf"), Utils.ToJsonStringArray(owner, spender));
6969
}
7070

7171
/// <summary>

0 commit comments

Comments
 (0)