Skip to content

Commit 97fac4e

Browse files
authored
Fix incorrect max int format saved after confirmed approval (#1561)
1 parent 6e00a9d commit 97fac4e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/raps/actions/unlock.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const unlock = async (wallet, currentRap, index, parameters) => {
9191
);
9292

9393
// Cache the approved value
94-
AllowancesCache.cache[cacheKey] = MaxUint256;
94+
AllowancesCache.cache[cacheKey] = MaxUint256.toString();
9595

9696
// update rap for hash
9797
currentRap.actions[index].transaction.hash = approval.hash;
@@ -170,8 +170,9 @@ export const assetNeedsUnlocking = async (
170170
assetToUnlock,
171171
contractAddress
172172
);
173+
173174
// Cache that value
174-
if (isNull(allowance)) {
175+
if (!isNull(allowance)) {
175176
AllowancesCache.cache[cacheKey] = allowance;
176177
}
177178
}

0 commit comments

Comments
 (0)