Skip to content

Commit

Permalink
Merge pull request #521 from primitivefinance/develop
Browse files Browse the repository at this point in the history
fix: approvals
  • Loading branch information
zachdt authored Sep 25, 2021
2 parents c42573c + feac4df commit 5bb2306
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@ const Downgrade = () => {
const handleApproval = useCallback(
(token: string, spender: string, amount: string) => {
onApprove(token, spender, amount)
.then()
.then(() => {
setApproved(true)
})
.catch((error) => {
addNotif(0, `Approving ${token} for ${spender}`, error.message, '')
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ const Downgrade = () => {
const handleApproval = useCallback(
(token: string, spender: string, amount: string) => {
onApprove(token, spender, amount)
.then()
.then(() => {
setApproved(true)
})
.catch((error) => {
addNotif(0, `Approving ${token} for ${spender}`, error.message, '')
})
Expand Down

1 comment on commit 5bb2306

@vercel
Copy link

@vercel vercel bot commented on 5bb2306 Sep 25, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.