Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devop/prep-hotfix #752

Merged
merged 12 commits into from
Mar 2, 2019
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### Hotfix v5.0.5-hotfix.1

### Bug

- Fix network addresses with discussed concat, fixes settings dollar amount, Token manual load fix, Ipad modal catch, Mozilla value error, update packages, fix verify feedback, and signed msg copy, await token fetch [#752](https://github.com/MyEtherWallet/MyEtherWallet/pull/752)

### Release v5.0.5

### Bug
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "myetherwallet",
"version": "5.0.5",
"version": "5.0.5-hotfix.1",
"description": "Client side ethereum wallet",
"licsense": "MIT",
"repository": "https://github.com/myetherwallet/myetherwallet",
Expand Down Expand Up @@ -37,7 +37,7 @@
"print-js": "1.0.54",
"register-service-worker": "1.6.2",
"vee-validate": "2.1.7",
"vue": "2.6.7",
"vue": "2.6.8",
"vue-mq": "1.0.1",
"vue-router": "3.0.2",
"vue-toasted": "1.1.26",
Expand Down Expand Up @@ -106,7 +106,7 @@
"uuid": "3.3.2",
"vue-i18n": "8.8.2",
"vue-tel-input": "2.0.16",
"vue-template-compiler": "2.6.7",
"vue-template-compiler": "2.6.8",
"vue-worker": "1.2.1",
"wallet-address-validator": "0.2.4",
"web3": "1.0.0-beta.37",
Expand Down
8 changes: 4 additions & 4 deletions src/components/CustomerSupport/CustomerSupport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</template>

<script>
import { Misc } from '@/helpers';
import platform from 'platform';

export default {
props: {
Expand Down Expand Up @@ -74,9 +74,9 @@ export default {
}
},
mounted() {
this.browser = this.$options.filters.capitalize(Misc.browserName());
this.os = this.$options.filters.capitalize(Misc.browserOs());
this.device = Misc.browserProduct();
this.browser = platform.name;
this.os = platform.os.family;
this.device = platform.product;
this.url = this.$router.history.current.fullPath;
},
methods: {
Expand Down
14 changes: 10 additions & 4 deletions src/components/SettingsModal/SettingsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{{ gasPriceInputs[key].eth }} {{ network.type.name }}
<span v-if="ethPrice !== 0 && network.type.name === 'ETH'">
($
{{ convert(gasPriceInputs[key].eth) | concatAddr }})
{{ convert(gasPriceInputs[key].eth) }})
</span>
</p>
</li>
Expand All @@ -63,8 +63,13 @@
</div>
<p>
{{ customGasEth }} {{ network.type.name }}
<span v-if="ethPrice !== 0 && customGasEth !== 0"
>($ {{ convert(customGasEth) | concatAddr }})</span
<span
v-if="
ethPrice !== 0 &&
customGasEth !== 0 &&
network.type.name === 'ETH'
"
>($ {{ convert(customGasEth) }})</span
>
</p>
</li>
Expand Down Expand Up @@ -407,7 +412,8 @@ export default {
this.file = window.URL.createObjectURL(file);
},
convert(price) {
return new BigNumber(price * this.ethPrice).toFixed();
const convertedPrice = new BigNumber(price * this.ethPrice).toFixed();
return this.$options.filters.concatAddr(convertedPrice);
},
async getEthPrice() {
const price = await fetch(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
width: 36px;

img {
width: 26px !important;
height: 26px !important;
width: auto !important;
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
<template lang="html">
<div class="address-container">
<div class="currency-container">
<img
v-if="tokenSymbol !== ''"
:src="require(`@/assets/images/currency/${lowerCaseCurrency}.svg`)"
/>
<div v-else class="icon-matcher">
<img :src="icon" />
<div class="icon-matcher">
<img :src="iconFetcher" />
</div>
<p>
<span class="currency-amt">
Expand Down Expand Up @@ -64,8 +60,18 @@ export default {
}
},
computed: {
iconFetcher() {
let icon;
try {
// eslint-disable-next-line
icon = require(`@/assets/images/currency/${lowerCaseCurrency}.svg`);
} catch (e) {
icon = this.icon;
}
return icon;
},
lowerCaseCurrency() {
return this.currency.toLowerCase();
return this.tokenSymbol.toLowerCase();
},
checksumAddress() {
if (isAddress(this.tokenTransferTo))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export default {
.toFixed()
.toString()
: value.toString();
this.tokenSymbol = !token ? 'Unknown Token' : token.symbol;
this.tokenSymbol = token ? token.symbol : 'Unidentified Token';
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/filters/ConcatAddr.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
const ConcatAddr = function(value) {
if (!value) return '';
return `${value.substr(0, 7)}...${value.substr(value.length - 3)}`;
if (value.length > 10)
return `${value.substr(0, 15)}...${value.substr(value.length - 6)}`;
if (value.length > 6)
return `${value.substr(0, 6)}...${value.substr(value.length - 6)}`;
return value;
};

export default ConcatAddr;
21 changes: 1 addition & 20 deletions src/helpers/misc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const platform = require('platform');
import normalise from '@/helpers/normalise';
import nodeList from '@/networks';
import { isAddress } from './addressUtils';
Expand All @@ -16,21 +15,6 @@ const isJson = str => {
return true;
};

const browserName = () => {
if (window) return platform.name;
return undefined;
};

const browserOs = () => {
if (window) return platform.os;
return undefined;
};

const browserProduct = () => {
if (window) return platform.product;
return undefined;
};

const doesExist = val => val !== undefined && val !== null;

const padLeftEven = hex => {
Expand Down Expand Up @@ -181,8 +165,5 @@ export default {
scrollToTop,
reorderNetworks,
isDarklisted,
solidityType,
browserName,
browserOs,
browserProduct
solidityType
};
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ import trezorHov from '@/assets/images/icons/button-trezor-hover.png';
import keepkey from '@/assets/images/icons/button-keepkey.png';
import keepkeyHov from '@/assets/images/icons/button-keepkey-hover.png';
import WalletOption from '../WalletOption';
import { Toast, Misc } from '@/helpers';
import { Toast } from '@/helpers';
import { isSupported } from 'u2f-api';
import platform from 'platform';
import {
LedgerWallet,
KeepkeyWallet,
Expand Down Expand Up @@ -115,8 +116,13 @@ export default {
imgHoverPath: trezorHov,
text: 'Trezor',
disabled:
Misc.browserName() === 'chrome' || Misc.browserName() === 'firefox',
msg: ''
platform.name.toLowerCase() !== 'chrome' &&
platform.name.toLowerCase() !== 'firefox',
msg:
platform.name.toLowerCase() !== 'chrome' &&
platform.name.toLowerCase() !== 'firefox'
? 'Browser not supported by Trezor'
: ''
},
{
name: 'keepkey',
Expand Down Expand Up @@ -148,8 +154,8 @@ export default {

if (u2fhw.includes(item.name)) {
const disable =
(Misc.browserName() === 'chrome' ||
Misc.browserName() === 'opera') &&
platform.name.toLowerCase() !== 'chrome' &&
platform.name.toLowerCase() !== 'opera' &&
res;

item.disabled = disable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,10 @@
}
}
} // @media all and (min-width: calc(#{$mobile-width} + 1px)) and (max-width: $tablet-width)

.appstore-button-container {
.links-container {
display: flex;
justify-content: center;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
centered
>
<div class="modal-container">
<ipad-modal ref="ipadModal" />
<div class="modal-icon">
<qrcode :value="QrCode" :options="{ size: 200 }" />
</div>
Expand All @@ -16,20 +17,26 @@
</h3>
</div>
<div class="appstore-button-container">
<a
href="https://itunes.apple.com/us/app/mewconnect/id1391097156?mt=8"
target="_blank"
rel="noopener noreferrer"
>
<img src="~@/assets/images/icons/appstore.svg" height="35" />
</a>
<a
href="http://play.google.com/store/apps/details?id=com.myetherwallet.mewconnect"
target="_blank"
rel="noopener noreferrer"
>
<img src="~@/assets/images/icons/google-play.svg" height="35" />
</a>
<div class="links-container">
<a
v-if="canDownloadApple"
href="https://itunes.apple.com/us/app/mewconnect/id1391097156?mt=8"
target="_blank"
rel="noopener noreferrer"
>
<img src="~@/assets/images/icons/appstore.svg" height="35" />
</a>
<div v-else @click="openIpadModal">
<img src="~@/assets/images/icons/appstore.svg" height="35" />
</div>
<a
href="http://play.google.com/store/apps/details?id=com.myetherwallet.mewconnect"
target="_blank"
rel="noopener noreferrer"
>
<img src="~@/assets/images/icons/google-play.svg" height="35" />
</a>
</div>
<p class="download-now">{{ $t('accessWallet.mewConnectDesc2') }}</p>
</div>
<customer-support />
Expand All @@ -43,14 +50,18 @@ import CustomerSupport from '@/components/CustomerSupport';
import { MewConnectWallet } from '@/wallets';
import { mapGetters } from 'vuex';
import { Toast } from '@/helpers';
import platform from 'platform';
import IpadModal from '@/components/IpadModal';

export default {
components: {
'customer-support': CustomerSupport
'customer-support': CustomerSupport,
'ipad-modal': IpadModal
},
data() {
return {
QrCode: ''
QrCode: '',
canDownloadApple: true
};
},
computed: {
Expand All @@ -60,6 +71,8 @@ export default {
})
},
mounted() {
this.canDownloadApple =
platform.product && platform.product.toLowerCase() !== 'ipad';
this.$refs.mewConnect.$on('show', () => {
new MewConnectWallet(this.codeDisplay)
.then(wallet => {
Expand All @@ -81,6 +94,9 @@ export default {
methods: {
codeDisplay(qrCode) {
this.QrCode = qrCode;
},
openIpadModal() {
this.$refs.ipadModal.$refs.ipadModal.show();
}
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@
height="30px"
/>
</li>
<li>{{ account.account.getChecksumAddressString() }}</li>
<li>
{{ account.account.getChecksumAddressString() | concatAddr }}
</li>
<li>{{ convertBalance(account.balance) }}</li>
<li class="user-input-checkbox">
<label class="checkbox-container checkbox-container-small">
Expand Down
Loading