diff --git a/package-lock.json b/package-lock.json index 940ca77..fbd43b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ecto", - "version": "1.1.0", + "version": "1.1.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 392ff3a..e65ffcb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ecto", - "version": "1.1.0", + "version": "1.1.1", "private": true, "scripts": { "build": "vue-cli-service build", diff --git a/public/assets/brc.png b/public/assets/brc.png new file mode 100644 index 0000000..7004646 Binary files /dev/null and b/public/assets/brc.png differ diff --git a/public/assets/dai.png b/public/assets/dai.png new file mode 100644 index 0000000..698ffc4 Binary files /dev/null and b/public/assets/dai.png differ diff --git a/public/assets/usdc.png b/public/assets/usdc.png new file mode 100644 index 0000000..fb2bc48 Binary files /dev/null and b/public/assets/usdc.png differ diff --git a/public/assets/usdt.png b/public/assets/usdt.png new file mode 100644 index 0000000..d2d0054 Binary files /dev/null and b/public/assets/usdt.png differ diff --git a/src/locales/nl.json b/src/locales/nl.json index 89fff58..7af7903 100644 --- a/src/locales/nl.json +++ b/src/locales/nl.json @@ -17,7 +17,7 @@ "from": "Ontvangen van", "infused": "Ingevoegd", "unshown": "Onvermelde gebeurtenis", - "swapped": "Geswapped", + "swapped": "Verwisseld", "staked": "Gestaked", "with": "Met", "for": "voor", @@ -78,7 +78,7 @@ "home": { "assets": "Bezittingen", "activity": "Activiteiten", - "swaps": "Swaps", + "swaps": "Transacties", "multiChain": "multichain", "unstake": "Unstake", "unstakeTitle": "Unstake", @@ -124,61 +124,61 @@ "errorMessage1": "", "secondLine1": "Gestaked", "secondLine2": " Niet geclaimed", - "pendingSwaps": "Nog te verwerken Swaps", + "pendingSwaps": "Nog te verwerken Transacties", "pendingSwapFrom": "nog te verwerken:", "from": "van", "to": "naar", - "swap": "swap", - "swapUppercase": "Swap", - "swapHowMany": "Welk aantal wil je swappen?", + "swap": "verwissel", + "swapUppercase": "Verwissel", + "swapHowMany": "Welk aantal wil je verwisselen?", "swapFrom": "Swap van", - "noSwapsNEO": "Er zijn geen bezittingen aan de NEO kant van jouw wallet die geswapped kunnen worden.", - "noSwapsETH": "Er zijn geen bezittingen aan de Ethereum kant van jouw wallet die geswapped kunnen worden.", - "sendAssetsSwap": "Stuur de bezittingen die je wilt swappen naar", - "swappableAssets": "Bezittingen die geswapped kunnen worden in", + "noSwapsNEO": "Er zijn geen bezittingen aan de NEO kant van jouw wallet die verwisseld kunnen worden.", + "noSwapsETH": "Er zijn geen bezittingen aan de Ethereum kant van jouw wallet die verwisseld kunnen worden.", + "sendAssetsSwap": "Stuur de bezittingen die je wilt verwisselen naar", + "swappableAssets": "Bezittingen die verwisseld kunnen worden in", "importETHWallet": "importeer Ethereum wallet", "withYourKey": "met jouw hex privésleutel (bv van Metamask)", - "swapTo": "Swap naar", - "swapToNeo": "Swap naar de NEO kant van jouw wallet", - "swapToETH": "Swap naar de Ethereum kant van jouw wallet", - "swapToAnotherNEO": "Of swap naar een andere NEO wallet", - "swapToAnotherETH": "Of swap naar een andere Ethereum wallet", + "swapTo": "Verwissel naar", + "swapToNeo": "Verwissel naar de NEO kant van jouw wallet", + "swapToETH": "Verwissel naar de Ethereum kant van jouw wallet", + "swapToAnotherNEO": "Of verwissel naar een andere NEO wallet", + "swapToAnotherETH": "Of verwissel naar een andere Ethereum wallet", "selectAsset": "kies bezitting", "selectAssetUppercase": "Kies Bezitting", "selectAssetAndDest": "kies bezitting en bestemming", - "swapExplanation": "Om swaps mogelijk te maken moet je eenmalig gebruik maken van jouw WIF of privésleutel. Dit genereert de NEO and Ethereum addressen die gekoppeld zijn aan jouw wallet.", + "swapExplanation": "Om verwisselingen mogelijk te maken moet je eenmalig gebruik maken van jouw WIF of privésleutel. Dit genereert de NEO and Ethereum addressen die gekoppeld zijn aan jouw wallet.", "continue": "verder", "labelDestinationAddress": " bestemmingsadres", - "availableToSwap": "Je hebt de volgende beschikbare bezittingen om te swappen naar", + "availableToSwap": "Je hebt de volgende beschikbare bezittingen om te verwisselen naar", "fee": "Kosten", - "swapNeed": "Om te swappen heb je nodig:", - "swapDestination": "Swap bestemming", + "swapNeed": "Om te verwisselen heb je nodig:", + "swapDestination": "Verwissel bestemming", "write": "Schrijf", "destinationAddress": "bestemmingsadres", - "enableSwaps": "Maak swaps mogelijk", - "insertSwapsWIF": "Type jouw WIF in om een openbaar swapadres te genereren.", - "insertSwapsPassword": "Type jouw wachtwoord in om een openbaarswapadres te genereren.", + "enableSwaps": "Maak verwisselingen mogelijk", + "insertSwapsWIF": "Type jouw WIF in om een openbaar verwisseladres te genereren.", + "insertSwapsPassword": "Type jouw wachtwoord in om een openbaar verwisseladres te genereren.", "generate": "Genereer", "feeSlow": "Langzaam", "feeStandard": "Standaard", "feeFast": "Snel", "or": "of", - "swapAmount": "Swap Aantal", - "needGasToSwap": "Je hebt {0} GAS in Phantasma nodig om voor de swapkosten te betalen.", - "needEthToSwap": "An ETH swap costs approx. {0} ETH in fees.An ERC20 swap costs approx. {1} ETH in fees.", - "swapInProgressTitle": "Swap wordt verwerkt", - "swapBeingProcessed": "Swap wordt verwerkt.", + "swapAmount": "Verwissel Aantal", + "needGasToSwap": "Je hebt {0} GAS in Phantasma nodig om voor de verwisselkosten te betalen.", + "needEthToSwap": "Een ETH verwisseling kost ongeveer {0} ETH aan kosten.Een ERC20 verwisseling kost ongeveer {1} ETH aan kosten.", + "swapInProgressTitle": "Verwisseling wordt verwerkt", + "swapBeingProcessed": "Verwisseling wordt verwerkt.", "needsConfirmations": "Er zijn 12 bevestigingen nodig om te verschijnen.", "checkTransaction": "Controleer de transactie", "here": "hier", - "assetsIn": "Known assets in", - "sendInProgress": "Send in progress", - "sendBeingProcessed": "Your send is being processed.", - "exportPrivateKey": "export your hex private key", - "andImportInMetamask": "and import in Metamask", - "crossChain": "CROSS CHAIN TRANSFERS", - "sameChain": "SAME CHAIN TRANSFERS", - "sendOn": "Send on" + "assetsIn": "Bezittingen in", + "sendInProgress": "Transactie bezig", + "sendBeingProcessed": "De transactie wordt verwerkt.", + "exportPrivateKey": "exporteer jouw hex privésleutel", + "andImportInMetamask": "en importeer in Metamask", + "crossChain": "OVERDRACHTEN TUSSEN CHAINS", + "sameChain": "OVERDRACHTEN OP DEZELFDE CHAIN", + "sendOn": "Verstuur op" }, "nfts": { "selected": "gekozen", diff --git a/src/manifest.development.json b/src/manifest.development.json index e414897..dc8b762 100644 --- a/src/manifest.development.json +++ b/src/manifest.development.json @@ -3,7 +3,7 @@ "name": "__MSG_appName__", "description": "__MSG_appDesc__", "default_locale": "en", - "version": "1.1.0", + "version": "1.1.1", "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html" diff --git a/src/manifest.production.json b/src/manifest.production.json index 922e187..9b90ebf 100644 --- a/src/manifest.production.json +++ b/src/manifest.production.json @@ -3,7 +3,7 @@ "name": "__MSG_appName__", "description": "__MSG_appDesc__", "default_locale": "en", - "version": "1.1.0", + "version": "1.1.1", "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html" diff --git a/src/popup/App/App.vue b/src/popup/App/App.vue index 620e208..7d3ee4b 100644 --- a/src/popup/App/App.vue +++ b/src/popup/App/App.vue @@ -267,7 +267,20 @@ export default class extends Vue { setTimeout(async () => { if (tx && tx !== "") { const error = await state.checkTxError(tx); - if (error) { + if (error === "pending") { + // retry because tx is pending + setTimeout(async () => { + const error = await state.checkTxError(tx); + if (error) { + let shortError = + error.length > 120 ? error.substring(0, 120) + "..." : error; + this.$root.$emit("errorMessage", { + msg: this.$t("app.errorMessage"), + details: shortError, + }); + } + }, 2500); + } else if (error) { let shortError = error.length > 120 ? error.substring(0, 120) + "..." : error; this.$root.$emit("errorMessage", { diff --git a/src/popup/PopupState.ts b/src/popup/PopupState.ts index 922586b..f1d33fa 100644 --- a/src/popup/PopupState.ts +++ b/src/popup/PopupState.ts @@ -109,7 +109,7 @@ export class PopupState { allSwaps: Swap[] = []; - payload = "4543542D312E312E30"; + payload = "4543542D312E312E31"; $i18n: any = { t: (s: string) => s, @@ -320,6 +320,8 @@ export class PopupState { return this._currenciesRate["mu-dank"][curSym]; case "goati": return 0.1; + case "usdc": + return this._currenciesRate["usd-coin"][curSym]; } } catch { console.log("Error getting rates for " + symbol + " in " + curSym); @@ -452,7 +454,7 @@ export class PopupState { async fetchRates() { const res = await fetch( - "https://api.coingecko.com/api/v3/simple/price?ids=phantasma%2Cphantasma-energy%2Cneo%2Cgas%2Ctether%2Cethereum%2Cdai%2Cdynamite%2Cmu-dank&vs_currencies=usd%2Ceur%2Cgbp%2Cjpy%2Ccad%2Caud%2Ccny%2Crub" + "https://api.coingecko.com/api/v3/simple/price?ids=phantasma%2Cphantasma-energy%2Cneo%2Cgas%2Ctether%2Cethereum%2Cdai%2Cdynamite%2Cmu-dank%2Cusd-coin%2Cdai%2Ctether&vs_currencies=usd%2Ceur%2Cgbp%2Cjpy%2Ccad%2Caud%2Ccny%2Crub" ); const resJson = await res.json(); this._currenciesRate = resJson; @@ -1093,6 +1095,8 @@ export class PopupState { return 18; case "DANK": return 18; + case "USDC": + return 6; default: return 0; } diff --git a/src/views/AddWallet.vue b/src/views/AddWallet.vue index 34ed129..cd91d6d 100644 --- a/src/views/AddWallet.vue +++ b/src/views/AddWallet.vue @@ -5,7 +5,7 @@ - {{ $t('addWallet.add') }} + {{ $t("addWallet.add") }} @@ -25,8 +25,8 @@ - {{ $t('addWallet.import') }} - {{ $t('addWallet.create') }} + {{ $t("addWallet.import") }} + {{ $t("addWallet.create") }} - {{ $t('addWallet.description1') }} + {{ $t("addWallet.description1") }} - {{ $t('addWallet.or') }} + {{ $t("addWallet.or") }} {{ $t('addWallet.importLong') }}{{ $t("addWallet.importLong") }} - {{ $t('addWallet.description2') }} + {{ $t("addWallet.description2") }} - {{ $t('addWallet.description3') }} + {{ $t("addWallet.description3") }} @@ -104,15 +104,14 @@ - - + - {{ $t('addWallet.generate') }} + {{ $t("addWallet.generate") }} - {{ $t('addWallet.created') }} + {{ $t("addWallet.created") }} - {{ $t('addWallet.importLong') }} + {{ $t("addWallet.importLong") }} - {{ $t('addWallet.description4') }} + {{ $t("addWallet.description4") }} - {{ $t('addWallet.description5') }} + {{ $t("addWallet.description5") }} @@ -164,7 +163,9 @@ - {{ $t('addWallet.backup') }} + {{ + $t("addWallet.backup") + }} @@ -180,7 +181,7 @@ rows="3" > {{ $t('addWallet.copy') }} + >{{ $t("addWallet.copy") }} mdi-content-copy @@ -191,7 +192,7 @@ text @click="copyWifDialog = false" > - {{ $t('addWallet.no') }} + {{ $t("addWallet.no") }} @@ -203,7 +204,7 @@ setPassDialog = true; " > - {{ $t('addWallet.backupConfirm') }} + {{ $t("addWallet.backupConfirm") }} @@ -211,11 +212,13 @@ - {{ $t('addWallet.setPassword') }} + {{ + $t("addWallet.setPassword") + }} - {{ $t('addWallet.secure') }} + {{ $t("addWallet.secure") }} @@ -243,7 +246,7 @@ setPassDialog = false; " > - {{ $t('addWallet.cancel') }} + {{ $t("addWallet.cancel") }} - {{ $t('addWallet.importLong') }} + {{ $t("addWallet.importLong") }} @@ -318,16 +321,16 @@ export default class extends Vue { get i18n() { return { - descriptionLong: this.$t('addWallet.descriptionLong'), - recover: this.$t('addWallet.recover') + descriptionLong: this.$t("addWallet.descriptionLong"), + recover: this.$t("addWallet.recover"), }; } async importWallet() { console.log("Going to import wallet"); - this.errorMessage1 = this.$i18n.t('addWallet.errorMessage1').toString(); - this.errorMessage2 = this.$i18n.t('addWallet.errorMessage2').toString(); - this.errorMessage3 = this.$i18n.t('addWallet.errorMessage3').toString(); + this.errorMessage1 = this.$i18n.t("addWallet.errorMessage1").toString(); + this.errorMessage2 = this.$i18n.t("addWallet.errorMessage2").toString(); + this.errorMessage3 = this.$i18n.t("addWallet.errorMessage3").toString(); if (this.wif.length == 52 && this.password.length >= 6) { try { this.isLoading = true; @@ -346,6 +349,9 @@ export default class extends Vue { this.errorMessage = this.errorMessage2; this.errorDialog = true; } + } else if (this.addressOrName.length >= 52) { + this.errorMessage = this.errorMessage3; + this.errorDialog = true; } else { try { this.isLoading = true;