Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat/permit_2' into tmp/20240725
Browse files Browse the repository at this point in the history
  • Loading branch information
richardo2016x committed Jul 26, 2024
2 parents fb94732 + 8208c5b commit 7068c57
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ui/views/ApprovalManagePage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ function getColumnsForContract({
return checkResult.keepRiskFirstReturnValue;

return (
b.$riskAboutValues.risk_spend_usd_value -
a.$riskAboutValues.risk_spend_usd_value
a.$riskAboutValues.risk_spend_usd_value -
b.$riskAboutValues.risk_spend_usd_value
);
},
sortOrder:
Expand Down
10 changes: 9 additions & 1 deletion src/ui/views/ApprovalManagePage/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ export const findIndexRevokeList = <
if (
revoke.contractId === token.contract_id &&
revoke.spender === token.spender.id &&
(!revoke.permit2Id ||
revoke.permit2Id ===
findContractMatchedSpender(token, item)?.permit2_id) &&
revoke.tokenId === token.inner_id &&
revoke.chainServerId === token.chain
) {
Expand All @@ -129,6 +132,9 @@ export const findIndexRevokeList = <
if (
revoke.contractId === token.contract_id &&
revoke.spender === token.spender.id &&
(!revoke.permit2Id ||
revoke.permit2Id ===
findContractMatchedSpender(token, item)?.permit2_id) &&
revoke.chainServerId === token.chain
) {
return true;
Expand All @@ -138,6 +144,9 @@ export const findIndexRevokeList = <
return list.findIndex((revoke) => {
if (
revoke.spender === item.id &&
(!revoke.permit2Id ||
revoke.permit2Id ===
findContractMatchedSpender(token, item)?.permit2_id) &&
revoke.id === token.id &&
revoke.chainServerId === item.chain
) {
Expand All @@ -149,7 +158,6 @@ export const findIndexRevokeList = <
return list.findIndex((revoke) => {
if (
revoke.spender === (token as Spender).id &&
revoke.permit2Id === getFirstSpender(token)?.permit2_id &&
revoke.id === item.id &&
revoke.chainServerId === item.chain
) {
Expand Down

0 comments on commit 7068c57

Please sign in to comment.