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

BLO-1632: update ramp sdk #57

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependencies": {
"@analytics/google-analytics": "^0.5.3",
"@google/model-viewer": "^1.12.0",
"@ramp-network/ramp-instant-sdk": "^2.5.0",
"@ramp-network/ramp-instant-sdk": "^4.0.4",
"@xstate/react": "^1.5.1",
"analytics": "^0.7.14",
"analytics-plugin-do-not-track": "^0.1.5",
Expand Down
7 changes: 4 additions & 3 deletions src/libs/ramp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ export const showRampPromise = ({
...(REACT_APP_RAMP_API_KEY && {
hostApiKey: REACT_APP_RAMP_API_KEY,
}),
defaultFlow: "ONRAMP",
enabledFlows: ["ONRAMP"],
...(networkId === 3 && {
url: "https://ri-widget-staging-ropsten.firebaseapp.com/",
url: "https://app.demo.ramp.network/",
}),
})
/** Possible Events (for more info see https://docs.ramp.network/events)
Expand All @@ -55,10 +57,9 @@ export const showRampPromise = ({
?.classList.remove("ramp--loading-overwrite")
case "WIDGET_CLOSE":
return res(false)
case "PURCHASE_FAILED":
case "WIDGET_CONFIG_FAILED":
return rej(event.type)
case "PURCHASE_SUCCESSFUL":
case "PURCHASE_CREATED":
return res(true)
}
})
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2425,12 +2425,12 @@
pocket-js-core "0.0.3"
web3-provider-engine "16.0.1"

"@ramp-network/ramp-instant-sdk@^2.5.0":
version "2.5.0"
resolved "https://registry.yarnpkg.com/@ramp-network/ramp-instant-sdk/-/ramp-instant-sdk-2.5.0.tgz#4d8a746cd5cf2dfd6ffb1451058cfe9126d85c10"
integrity sha512-KKow1w+G49a/zq4Vv659G+ZVWs6DwWglLJL2H7XxATbCSE+7QknNjId/RIwJ1sDfJv10rV4AqjELXcPsgKlgcw==
"@ramp-network/ramp-instant-sdk@^4.0.4":
version "4.0.4"
resolved "https://registry.yarnpkg.com/@ramp-network/ramp-instant-sdk/-/ramp-instant-sdk-4.0.4.tgz#25e1327ff2aead8bbab3c1cb5257da9041867442"
integrity sha512-Kkn+xwc4EbD2YqXOOQChZCqRT8/DM8sh9Qnz1nI2+/ACdo3INc42FMubgw5aZlyBzuF32XL/xdZyWBGPF4vECg==
dependencies:
body-scroll-lock "^2.6.4"
body-scroll-lock "^3.1.5"

"@resolver-engine/core@^0.3.3":
version "0.3.3"
Expand Down Expand Up @@ -5317,10 +5317,10 @@ [email protected], body-parser@^1.16.0:
type-is "~1.6.18"
unpipe "1.0.0"

body-scroll-lock@^2.6.4:
version "2.7.1"
resolved "https://registry.yarnpkg.com/body-scroll-lock/-/body-scroll-lock-2.7.1.tgz#caf3f9c91773af1ffb684cd66ed9137b5b737014"
integrity sha512-hS53SQ8RhM0e4DsQ3PKz6Gr2O7Kpdh59TWU98GHjaQznL7y4dFycEPk7pFQAikqBaUSCArkc5E3pe7CWIt2fZA==
body-scroll-lock@^3.1.5:
version "3.1.5"
resolved "https://registry.yarnpkg.com/body-scroll-lock/-/body-scroll-lock-3.1.5.tgz#c1392d9217ed2c3e237fee1e910f6cdd80b7aaec"
integrity sha512-Yi1Xaml0EvNA0OYWxXiYNqY24AfWkbA6w5vxE7GWxtKfzIbZM+Qw+aSmkgsbWzbHiy/RCSkUZBplVxTA+E4jJg==

bonjour@^3.5.0:
version "3.5.0"
Expand Down
Loading