Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
70292a55
Unverified
Commit
70292a55
authored
May 20, 2021
by
Moody Salem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not ask for approve for argent wallet migrate
parent
ecdbb4a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
MigrateV2Pair.tsx
src/pages/MigrateV2/MigrateV2Pair.tsx
+5
-2
No files found.
src/pages/MigrateV2/MigrateV2Pair.tsx
View file @
70292a55
...
...
@@ -9,6 +9,7 @@ import CurrencyLogo from '../../components/CurrencyLogo'
import
FormattedCurrencyAmount
from
'
../../components/FormattedCurrencyAmount
'
import
{
AutoRow
,
RowBetween
,
RowFixed
}
from
'
../../components/Row
'
import
{
useV2LiquidityTokenPermit
}
from
'
../../hooks/useERC20Permit
'
import
useIsArgentWallet
from
'
../../hooks/useIsArgentWallet
'
import
{
useTotalSupply
}
from
'
../../hooks/useTotalSupply
'
import
{
useActiveWeb3React
}
from
'
../../hooks/web3
'
import
{
useToken
}
from
'
../../hooks/Tokens
'
...
...
@@ -258,8 +259,10 @@ function V2PairMigration({
const
[
approval
,
approveManually
]
=
useApproveCallback
(
pairBalance
,
migrator
?.
address
)
const
{
signatureData
,
gatherPermitSignature
}
=
useV2LiquidityTokenPermit
(
pairBalance
,
migrator
?.
address
)
const
isArgentWallet
=
useIsArgentWallet
()
const
approve
=
useCallback
(
async
()
=>
{
if
(
isNotUniswap
)
{
if
(
isNotUniswap
||
isArgentWallet
)
{
// sushi has to be manually approved
await
approveManually
()
}
else
if
(
gatherPermitSignature
)
{
...
...
@@ -274,7 +277,7 @@ function V2PairMigration({
}
else
{
await
approveManually
()
}
},
[
isNotUniswap
,
gatherPermitSignature
,
approveManually
])
},
[
isNotUniswap
,
isArgentWallet
,
gatherPermitSignature
,
approveManually
])
const
addTransaction
=
useTransactionAdder
()
const
isMigrationPending
=
useIsTransactionPending
(
pendingMigrationHash
??
undefined
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment