Skip to content

Commit

Permalink
devop: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gamalielhere committed Jul 30, 2024
1 parent b5b2701 commit 3eca69c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
12 changes: 10 additions & 2 deletions src/components/OrderForm/BuyForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ const topperPrice = computed(() => {
return new BigNumber(
topperAvailable.value
? topperData[form.cryptoSelected]?.prices[form.fiatSelected]
: 0
: "0"
);
});
const topperNetworkFeeText = computed(() => {
Expand Down Expand Up @@ -653,7 +653,7 @@ const topperCryptoAmount = computed(() => {
? formatFloatingPointValue(
amount.dividedBy(topperPrice.value.toFixed(2)).toString()
).value
: 0;
: "0";
});

/**
Expand Down Expand Up @@ -1088,6 +1088,8 @@ const submitForm = (): void => {
dailyLimit: dailyLimit("topper"),
monthlyLimit: monthlyLimit(),
fiatAmount: topperFiatAmount.value,
fiatAmountF: formatFiatValue(topperFiatAmount.value, currencyConfig.value)
.value,
min: topperData[cryptoSelected]?.limits[fiatSelected]?.min || 50,
},
simplex_quote: {
Expand All @@ -1099,6 +1101,10 @@ const submitForm = (): void => {
dailyLimit: dailyLimit("simplex"),
monthlyLimit: monthlyLimit(),
fiatAmount: simplexFiatAmount.value,
fiatAmountF: formatFiatValue(
simplexFiatAmount.value,
currencyConfig.value
).value,
min: simplexData[cryptoSelected]?.limits[fiatSelected]?.min || 50,
},
address: address,
Expand All @@ -1111,6 +1117,8 @@ const submitForm = (): void => {
dailyLimit: dailyLimit("moonpay"),
monthlyLimit: monthlyLimit(),
fiatAmount: moonpayFiatAmount,
fiatAmountF: formatFiatValue(moonpayFiatAmount, currencyConfig.value)
.value,
min: moonpayData[cryptoSelected]?.limits[fiatSelected]?.min || 50,
},
open_providers: 2,
Expand Down
9 changes: 8 additions & 1 deletion src/components/OrderForm/BuyProviders.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="mew-heading-2 provider-text">Select provider</div>
</div>
<div class="mew-heading-2 font-weight-regular pb-2">
Spending <b>{{ topperQuote.plusFeeF }}</b>
Spending <b>{{ formattedFiat }}</b>
</div>
<div v-if="!processingBuy">
<!-- ============================================================== -->
Expand Down Expand Up @@ -317,6 +317,13 @@ export default defineComponent({
};
},
computed: {
formattedFiat(): string {
return (
this.simplexQuote.fiatAmountF ||
this.moonpayQuote.fiatAmountF ||
this.topperQuote.fiatAmountF
);
},
selectedFiatName(): string {
return this.selectedFiat.name;
},
Expand Down
1 change: 1 addition & 0 deletions src/components/OrderForm/network/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ interface QuoteData {
dailyLimit: string;
monthlyLimit: string;
fiatAmount: string;
fiatAmountF: string;
}
interface SubmitData {
simplex_quote: QuoteData;
Expand Down

0 comments on commit 3eca69c

Please sign in to comment.