Skip to content

Commit

Permalink
Merge pull request #34 from MyEtherWallet/fix/tokens
Browse files Browse the repository at this point in the history
devop: update version
  • Loading branch information
gamalielhere authored Jul 31, 2024
2 parents aec7146 + 3eca69c commit b0b6973
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: create release
on:
push:
branches:
- develop
- main

jobs:
deploy:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mew-ccswap",
"version": "6.9.10",
"version": "6.9.11-ccswap.2",
"private": true,
"packageManager": "[email protected]",
"scripts": {
Expand Down
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
8 changes: 1 addition & 7 deletions src/components/OrderForm/components/TokenSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,7 @@ const networkList = computed<Network[]>(() => {
});

const filteredNetworkList = computed<Network[]>(() => {
const withTokensNetwork = networkList.value
.filter((network) => {
if (network.tokens.length > 0) return network;
})
.filter((network) => {
if (hasValidPrices(network.name)) return network;
});
const withTokensNetwork = networkList.value;
const filter = networkSearchInput.value.toLowerCase();
return withTokensNetwork.filter((network) => {
if (
Expand Down
44 changes: 0 additions & 44 deletions src/components/OrderForm/network/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,50 +94,6 @@ export const Networks = <Array<Network>>[
username: '',
password: '',
},
{
name: 'BNB',
name_long: 'Binance Smart Chain',
chainID: 56,
tokens: [
{
img: require('@/assets/images/crypto/FDUSD-SC.png'),
name: 'First Digital USD',
subtext: 'First Digital USD',
value: 'First Digital USD',
symbol: 'FDUSD-SC',
network: 'BNB',
decimals: 18
},
{
img: getIcon('USDC'),
name: 'USD Coin (Binance Pegged)',
subtext: 'USD Coin (Binance Pegged)',
value: 'USD Coin (Binance Pegged)',
symbol: 'USDC-SC',
network: 'BNB',
decimals: 18
},
{
img: getIcon('USDT'),
name: 'Tether USD (Binance Smart Chain)',
subtext: 'Tether USD (Binance Smart Chain)',
value: 'Tether USD (Binance Smart Chain)',
symbol: 'USDT-SC',
network: 'BNB',
decimals: 18
},
],
icon: getIcon('BNB'),
currencyName: 'BNB',
gasPriceMultiplier: 1,
coingeckoID: 'binancecoin',
service: 'myetherwallet.com-ws',
url: 'wss://nodes.mewapi.io/ws/bsc',
port: 443,
auth: false,
username: '',
password: '',
},
{
name: 'MATIC',
name_long: 'Polygon (Matic)',
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 b0b6973

Please sign in to comment.