Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/approval limits #154

Merged
merged 13 commits into from
Nov 6, 2024
Merged

Fix/approval limits #154

merged 13 commits into from
Nov 6, 2024

Conversation

mikestarrdev
Copy link
Contributor

No description provided.

@mikestarrdev mikestarrdev marked this pull request as ready for review November 1, 2024 01:48
@mikestarrdev
Copy link
Contributor Author

mikestarrdev commented Nov 1, 2024

The purpose of this PR is to update the UI correctly when a user enters an amount to approve, for example 1, but then switches the approval amount to something else, such as 2 directly in the MetaMask browser extension. With new changes, the UI will get the approval amount from an event log, rather than a number stored in a Zustand state management store.

The best way to review this is to approve AST on Sepolia, then edit the amount to approve in your MetaMask browser extension, and make sure the value renders correctly on the UI.

PR154.demo.mov

Copy link
Contributor

@dmosites dmosites left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good with a couple requests.

@@ -51,5 +40,6 @@ export const contractAddressesByChain: Record<number, ContractList> = {
// sepolia
[ContractTypes.AirSwapStaking_latest]:
"0x8Bf384296A009723435aD5E8203DA5736b895038",
[ContractTypes.AirSwapToken]: "0x4092D6DBA9abB7450B9d91aA7ED2712935D63b39",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not be an AST on BSC. Member dashboard only connects to Mainnet and Sepolia (testnet).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently there is no AST on BSC in this file. The only BSC address is for AirSwapPool. The line you highlighted is AST token on Sepolia

@@ -11,6 +11,7 @@ type TestnetTokensNetworkMapping = {
[index: number]: TestnetClaimableToken[];
};

// FIXME: replace Goerli with Sepoli (11155111) addresses
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add the following for Sepolia.
"0x20aaebad8c7c6ffb6fdaa5a622c399561562beea", // USDT
"0xf450ef4f268eaf2d3d8f9ed0354852e255a5eaef", // USDC

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added these in. Please double check the setup

@@ -11,22 +11,22 @@ type TestnetTokensNetworkMapping = {
[index: number]: TestnetClaimableToken[];
};

// FIXME: replace Goerli with a (11155111) addresses
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop comment if ready.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment dropped

@mikestarrdev mikestarrdev merged commit c51f7c8 into main Nov 6, 2024
1 check passed
@mikestarrdev mikestarrdev deleted the fix/approval-limits branch November 6, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants