Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Geneste committed Apr 4, 2021
2 parents 209bf51 + 6eade7f commit cf25ff0
Show file tree
Hide file tree
Showing 12 changed files with 93 additions and 70 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ecto",
"version": "1.1.0",
"version": "1.1.1",
"private": true,
"scripts": {
"build": "vue-cli-service build",
Expand Down
Binary file added public/assets/brc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/dai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/usdc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/usdt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 35 additions & 35 deletions src/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"from": "Ontvangen van",
"infused": "Ingevoegd",
"unshown": "Onvermelde gebeurtenis",
"swapped": "Geswapped",
"swapped": "Verwisseld",
"staked": "Gestaked",
"with": "Met",
"for": "voor",
Expand Down Expand Up @@ -78,7 +78,7 @@
"home": {
"assets": "Bezittingen",
"activity": "Activiteiten",
"swaps": "Swaps",
"swaps": "Transacties",
"multiChain": "multi<br/>chain",
"unstake": "Unstake",
"unstakeTitle": "Unstake",
Expand Down Expand Up @@ -124,61 +124,61 @@
"errorMessage1": "<geen wallet>",
"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.<br>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.<br>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",
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.development.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.production.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
15 changes: 14 additions & 1 deletion src/popup/App/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down
8 changes: 6 additions & 2 deletions src/popup/PopupState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class PopupState {

allSwaps: Swap[] = [];

payload = "4543542D312E312E30";
payload = "4543542D312E312E31";

$i18n: any = {
t: (s: string) => s,
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -1093,6 +1095,8 @@ export class PopupState {
return 18;
case "DANK":
return 18;
case "USDC":
return 6;
default:
return 0;
}
Expand Down
62 changes: 34 additions & 28 deletions src/views/AddWallet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<v-list-item link @click="goto('/wallets')">
<v-list-item-content>
<v-list-item-title>{{ $t('addWallet.add') }}</v-list-item-title>
<v-list-item-title>{{ $t("addWallet.add") }}</v-list-item-title>
<v-list-item-subtitle></v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
Expand All @@ -25,16 +25,16 @@
</v-overlay>

<v-tabs v-model="tabIndex" background-color="white" color="#17b1e8" right>
<v-tab>{{ $t('addWallet.import') }}</v-tab>
<v-tab>{{ $t('addWallet.create') }}</v-tab>
<v-tab>{{ $t("addWallet.import") }}</v-tab>
<v-tab>{{ $t("addWallet.create") }}</v-tab>

<v-tab-item key="1">
<v-container
class="overflow-y-auto overflow-x-hidden pa-0"
style="max-height:500px"
>
<div style="padding: 15px">
{{ $t('addWallet.description1') }}
{{ $t("addWallet.description1") }}
</div>

<v-form
Expand All @@ -52,7 +52,7 @@
prepend-icon="mdi-account"
/>

<span style="padding:120px">{{ $t('addWallet.or') }}</span>
<span style="padding:120px">{{ $t("addWallet.or") }}</span>

<v-text-field
tabindex="2"
Expand Down Expand Up @@ -90,29 +90,28 @@
(!(wif.length == 52 || wif.length == 64) ||
password.length < 6)
"
>{{ $t('addWallet.importLong') }}</v-btn
>{{ $t("addWallet.importLong") }}</v-btn
>
</div>
<div class="ma-3 mb-6">
{{ $t('addWallet.description2') }}
{{ $t("addWallet.description2") }}
<a href="" @click.prevent="tabIndex = 1">
{{ $t('addWallet.description3') }}
{{ $t("addWallet.description3") }}
</a>
</div>
</v-container>
</v-tab-item>

<v-tab-item key="2">
<v-container v-if="createStep === 0">
<div v-html="i18n.descriptionLong" style="padding: 80px 20px">
</div>
<div v-html="i18n.descriptionLong" style="padding: 80px 20px"></div>
<v-btn block @click="generate">
{{ $t('addWallet.generate') }}
{{ $t("addWallet.generate") }}
</v-btn>
</v-container>
<v-container v-if="createStep === 1">
<div style="padding: 20px 8px">
{{ $t('addWallet.created') }}
{{ $t("addWallet.created") }}
</div>
<v-textarea
v-model="newAddress"
Expand All @@ -139,12 +138,12 @@
rows="2"
></v-textarea>
<v-btn block primary @click="copyWifDialog = true">
{{ $t('addWallet.importLong') }}
{{ $t("addWallet.importLong") }}
</v-btn>
<div class="ma-3 mt-6">
{{ $t('addWallet.description4') }}
{{ $t("addWallet.description4") }}
<a href="" @click.prevent="generate">
{{ $t('addWallet.description5') }}
{{ $t("addWallet.description5") }}
</a>
</div>
</v-container>
Expand All @@ -164,7 +163,9 @@

<v-dialog v-model="copyWifDialog" max-width="290">
<v-card>
<v-card-title class="headline">{{ $t('addWallet.backup') }}</v-card-title>
<v-card-title class="headline">{{
$t("addWallet.backup")
}}</v-card-title>

<v-card-text>
<span v-html="i18n.recover"></span>
Expand All @@ -180,7 +181,7 @@
rows="3"
></v-textarea>
<v-btn block small @click="copyWifToClipboard"
>{{ $t('addWallet.copy') }}
>{{ $t("addWallet.copy") }}
<v-icon right>mdi-content-copy</v-icon></v-btn
>
</v-card-text>
Expand All @@ -191,7 +192,7 @@
text
@click="copyWifDialog = false"
>
{{ $t('addWallet.no') }}
{{ $t("addWallet.no") }}
</v-btn>

<v-spacer></v-spacer>
Expand All @@ -203,19 +204,21 @@
setPassDialog = true;
"
>
{{ $t('addWallet.backupConfirm') }}
{{ $t("addWallet.backupConfirm") }}
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>

<v-dialog v-model="setPassDialog" max-width="290">
<v-card>
<v-card-title class="headline">{{ $t('addWallet.setPassword') }}</v-card-title>
<v-card-title class="headline">{{
$t("addWallet.setPassword")
}}</v-card-title>

<v-card-text>
<span>
{{ $t('addWallet.secure') }}
{{ $t("addWallet.secure") }}
</span>
<v-spacer />

Expand Down Expand Up @@ -243,7 +246,7 @@
setPassDialog = false;
"
>
{{ $t('addWallet.cancel') }}
{{ $t("addWallet.cancel") }}
</v-btn>
<v-spacer></v-spacer>
<v-btn
Expand All @@ -254,7 +257,7 @@
importWallet();
"
>
{{ $t('addWallet.importLong') }}
{{ $t("addWallet.importLong") }}
</v-btn>
</v-card-actions>
</v-card>
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit cf25ff0

Please sign in to comment.