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
cae56ec3
Commit
cae56ec3
authored
Dec 10, 2022
by
Jordan Frankfurt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add supported currency list to moonpay config (#45)
parent
d16b3473
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
index.tsx
src/components/FiatOnrampModal/index.tsx
+19
-1
No files found.
src/components/FiatOnrampModal/index.tsx
View file @
cae56ec3
...
@@ -49,6 +49,18 @@ const StyledSpinner = styled(CustomLightSpinner)`
...
@@ -49,6 +49,18 @@ const StyledSpinner = styled(CustomLightSpinner)`
top: 0;
top: 0;
`
`
const
MOONPAY_SUPPORTED_CURRENCY_CODES
=
[
'
eth
'
,
'
eth_arbitrum
'
,
'
eth_optimism
'
,
'
eth_polygon
'
,
'
matic_polygon
'
,
'
polygon
'
,
'
usdc_arbitrum
'
,
'
usdc_optimism
'
,
'
usdc_polygon
'
,
]
export
default
function
FiatOnrampModal
()
{
export
default
function
FiatOnrampModal
()
{
const
{
account
}
=
useWeb3React
()
const
{
account
}
=
useWeb3React
()
const
theme
=
useTheme
()
const
theme
=
useTheme
()
...
@@ -78,7 +90,13 @@ export default function FiatOnrampModal() {
...
@@ -78,7 +90,13 @@ export default function FiatOnrampModal() {
colorCode
:
theme
.
accentAction
,
colorCode
:
theme
.
accentAction
,
defaultCurrencyCode
:
'
eth
'
,
defaultCurrencyCode
:
'
eth
'
,
redirectUrl
:
'
https://app.uniswap.org/#/swap
'
,
redirectUrl
:
'
https://app.uniswap.org/#/swap
'
,
walletAddress
:
account
,
walletAddressed
:
MOONPAY_SUPPORTED_CURRENCY_CODES
.
reduce
(
(
acc
,
currencyCode
)
=>
({
...
acc
,
[
currencyCode
]:
account
,
}),
{}
),
}),
}),
})
})
const
{
url
}
=
await
res
.
json
()
const
{
url
}
=
await
res
.
json
()
...
...
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