diff --git a/src/App.vue b/src/App.vue
index 099dad81..098acd15 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -49,7 +49,9 @@ onBeforeMount(async () => {
async function setIframeStyle() {
const parentConnectionInstance = await parentConnectionStore.parentConnection
?.promise
- await parentConnectionInstance?.setIframeStyle(app.iframeStyle)
+ if (parentConnectionInstance && parentConnectionInstance['setIframeStyle']) {
+ await parentConnectionInstance?.setIframeStyle(app.iframeStyle)
+ }
}
watch(showWallet, async (newValue) => {
diff --git a/src/assets/images/onrampmoney.png b/src/assets/images/onrampmoney.png
new file mode 100644
index 00000000..2130677b
Binary files /dev/null and b/src/assets/images/onrampmoney.png differ
diff --git a/src/components/BuyTokens.vue b/src/components/BuyTokens.vue
index e6ad5f4e..0df94690 100644
--- a/src/components/BuyTokens.vue
+++ b/src/components/BuyTokens.vue
@@ -3,13 +3,11 @@ import { ref, type Ref } from 'vue'
import AppLoader from '@/components/AppLoader.vue'
import { openOnRampMoneyHostedUI } from '@/utils/onrampmoney.ramp'
-import { openRampSdk } from '@/utils/rampsdk'
import { openTransak } from '@/utils/transak'
import { useImage } from '@/utils/useImage'
type BuyTokenProps = {
transakNetwork?: string
- rampNetwork?: string
onRampMoney: number | false | undefined
}
@@ -43,12 +41,6 @@ function handleStatusModalText(provider: 'Transak' | 'Ramp' | 'onramp.money') {
}
}
-function handleRamp() {
- isLoading.value = true
- openRampSdk(props.rampNetwork as string)
- handleStatusModalText('Ramp')
-}
-
function handleOnRampMoney() {
if (props.onRampMoney === undefined || props.onRampMoney === false) {
throw new Error('!!!')
@@ -61,8 +53,6 @@ function handleOnRampMoney() {
function handleBuy() {
if (selectedProvider.value === 'transak') {
handleTransak()
- } else if (selectedProvider.value === 'ramp') {
- handleRamp()
} else if (selectedProvider.value === 'onramp.money') {
handleOnRampMoney()
}
@@ -136,25 +126,6 @@ function handleDone() {
Transak
-
-
-
-
diff --git a/src/components/UserWallet.vue b/src/components/UserWallet.vue
index 62de84e7..14def286 100644
--- a/src/components/UserWallet.vue
+++ b/src/components/UserWallet.vue
@@ -19,7 +19,6 @@ import { useRpcStore } from '@/store/rpc'
import { useUserStore } from '@/store/user'
import { HIDE_ON_RAMP } from '@/utils/constants'
import { isSupportedByOnRampMoney } from '@/utils/onrampmoney.ramp'
-import { getRampSupportedNetworks } from '@/utils/rampsdk'
import { getRequestHandler } from '@/utils/requestHandlerSingleton'
import { getTransakSupportedNetworks } from '@/utils/transak'
import { truncateToTwoDecimals } from '@/utils/truncateToTwoDecimal'
@@ -62,13 +61,6 @@ const transakNetwork = computed(() => {
)
})
-const rampNetwork = computed(() => {
- const selectedChainId = Number(rpcStore.selectedChainId)
- return getRampSupportedNetworks().find(
- (network) => network.chainId === selectedChainId
- )
-})
-
const onRampMoney = computed(() => {
const selectedChainId = Number(rpcStore.selectedChainId)
if (isSupportedByOnRampMoney(selectedChainId)) {
@@ -119,7 +111,7 @@ function openAddNetwork(open) {
}
function openEditNetwork(open, chainId: number | null = null) {
- if (Number(rpcStore.selectedRpcConfig.chainId) === Number(chainId)) {
+ if (Number(rpcStore.selectedRpcConfig?.chainId) === Number(chainId)) {
toast.error(
'This network is current selected, please chose a different one and try again'
)
@@ -179,7 +171,7 @@ onMounted(() => {
})
watch(
- () => rpcStore.selectedRPCConfig.chainId,
+ () => rpcStore.selectedRPCConfig?.chainId,
async () => {
await getRequestHandler().setRpcConfig({
...rpcStore.selectedRPCConfig,
@@ -297,7 +289,7 @@ watch(