Skip to content

Commit

Permalink
Merge pull request #575 from arcana-network/testnet
Browse files Browse the repository at this point in the history
Remove onramp money
  • Loading branch information
shrinathprabhu authored Feb 1, 2024
2 parents d4f63d9 + 05f5b0b commit add4122
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 48 deletions.
12 changes: 1 addition & 11 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { AppMode } from '@arcana/auth'
import { computed, onBeforeMount, toRefs, watch } from 'vue'
import { computed, toRefs, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import WalletFooter from '@/components/AppFooter.vue'
Expand All @@ -15,8 +15,6 @@ import { useRequestStore } from '@/store/request'
import { useStarterTipsStore } from '@/store/starterTips'
import { AUTH_NETWORK } from '@/utils/constants'
import { getImage } from '@/utils/getImage'
import { initializeOnRampMoney } from '@/utils/onrampmoney.ramp'
import { fetchTransakNetworks } from '@/utils/transak'
import '@/index.css'
Expand Down Expand Up @@ -46,14 +44,6 @@ const showWalletButton = computed(() => {
return !app.expandWallet && app.validAppMode !== AppMode.Widget
})
onBeforeMount(async () => {
try {
await Promise.all([fetchTransakNetworks(), initializeOnRampMoney()])
} catch (e) {
console.error('Failed to initialize one or more on-ramps:', e)
}
})
async function setIframeStyle() {
if (app.validAppMode === AppMode.NoUI) {
return
Expand Down
35 changes: 0 additions & 35 deletions src/components/BuyTokens.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,41 +126,6 @@ function handleDone() {
class="radio"
/>
</div>
<div
class="flex gap-3 p-4 items-center justify-between border border-1 rounded-sm transition-all duration-300 ease-in-out"
:class="{
'opacity-60 cursor-not-allowed': !props.onRampMoney,
'hover:border-gray-100 cursor-pointer': props.onRampMoney,
'border-black-500 dark:border-gray-100 bg-white-300 dark:bg-black-300':
selectedProvider === 'onramp.money',
'border-gray-800 dark:border-gray-200':
selectedProvider !== 'onramp.money',
}"
@click.stop="
props.onRampMoney ? (selectedProvider = 'onramp.money') : void 0
"
>
<label
for="OnRampMoney"
class="flex gap-2 items-center cursor-pointer"
:class="{ 'opacity-50': props.onRampMoney === false }"
>
<img
src="@/assets/images/onrampmoney.png"
class="h-7 w-7 bg-[#F2F2F2] rounded-full"
/>
<span class="text-base">onramp.money</span>
</label>
<input
id="OnRampMoney"
v-model="selectedProvider"
type="radio"
value="onramp.money"
name="provider"
:disabled="props.onRampMoney === false"
class="radio"
/>
</div>
</div>
<div class="flex space-x-3 bg-[#313131] p-3 rounded-sm">
<img class="w-4 h-4 mt-1" :src="getImage('info-icon')" />
Expand Down
15 changes: 13 additions & 2 deletions src/components/UserWallet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '@headlessui/vue'
import Decimal from 'decimal.js'
import { storeToRefs } from 'pinia'
import { computed, ref, watch, type Ref } from 'vue'
import { computed, ref, watch, onBeforeMount, type Ref } from 'vue'
import { useRouter } from 'vue-router'
import { useToast } from 'vue-toastification'
Expand All @@ -25,13 +25,24 @@ import { getImage } from '@/utils/getImage'
import { isSupportedByOnRampMoney } from '@/utils/onrampmoney.ramp'
import { getRequestHandler } from '@/utils/requestHandlerSingleton'
import { truncateMid } from '@/utils/stringUtils'
import { getTransakSupportedNetworks } from '@/utils/transak'
import {
getTransakSupportedNetworks,
fetchTransakNetworks,
} from '@/utils/transak'
type UserWalletProps = {
page: 'home' | 'nft'
refreshIconAnimating: boolean
}
onBeforeMount(async () => {
try {
await Promise.all([fetchTransakNetworks()])
} catch (e) {
console.error('Failed to initialize one or more on-ramps:', e)
}
})
const props = defineProps<UserWalletProps>()
const emit = defineEmits(['show-loader', 'hide-loader', 'refresh'])
const router = useRouter()
Expand Down

0 comments on commit add4122

Please sign in to comment.