Skip to content

Commit

Permalink
Bug/web3 wallet support (MyEtherWallet#976)
Browse files Browse the repository at this point in the history
* Reimplement web3 wallet support for web3 wallets with no listeners

* Update changelog

* Update keepkey links and greenkeeper packages

* distinguised message between text and hex

* fix some href to add rel='noopener norefferer'

* Update greenkeeper packages

* Add affiliates file

* Remove duplicate functions
  • Loading branch information
gamalielhere authored and SteveMieskoski committed Apr 25, 2019
1 parent d8d866b commit 86f474b
Show file tree
Hide file tree
Showing 16 changed files with 282 additions and 157 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### Bug

- Reimplement support for web3 wallets [#976](https://github.com/MyEtherWallet/MyEtherWallet/pull/976)

### Feature

- Support local nodes [#973](https://github.com/MyEtherWallet/MyEtherWallet/pull/973)
Expand Down
76 changes: 42 additions & 34 deletions package-lock.json

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

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"platform": "1.3.5",
"print-js": "1.0.55",
"register-service-worker": "1.6.2",
"vee-validate": "2.2.3",
"vee-validate": "2.2.4",
"vue": "2.6.10",
"vue-datetime": "1.0.0-beta.10",
"vue-mq": "1.0.1",
Expand All @@ -55,8 +55,8 @@
"@ensdomains/dnsregistrar": "0.3.1",
"@ethereum-alarm-clock/lib": "0.3.5",
"@keepkey/keepkey.js": "1.2.1",
"@ledgerhq/hw-app-eth": "4.53.0",
"@ledgerhq/hw-transport-u2f": "4.53.0",
"@ledgerhq/hw-app-eth": "4.54.0",
"@ledgerhq/hw-transport-u2f": "4.54.0",
"@myetherwallet/eth-token-balance": "0.1.4",
"@myetherwallet/mewconnect-web-client": "1.0.14",
"@vue/cli-plugin-babel": "3.6.0",
Expand All @@ -73,7 +73,7 @@
"babel-jest": "23.6.0",
"bignumber.js": "8.1.1",
"bip39": "3.0.1",
"bootstrap-vue": "2.0.0-rc.18",
"bootstrap-vue": "2.0.0-rc.19",
"canvas": "1.6.13",
"codecov": "3.3.0",
"copy-webpack-plugin": "5.0.2",
Expand Down Expand Up @@ -108,15 +108,15 @@
"store": "2.0.12",
"string-replace-loader": "2.1.1",
"stylelint": "10.0.0",
"stylelint-config-prettier": "5.0.0",
"stylelint-config-prettier": "5.1.0",
"stylelint-config-standard": "18.3.0",
"trezor-connect": "7.0.3",
"u2f-api": "1.0.10",
"uglify-es": "3.3.9",
"unused-files-webpack-plugin": "3.4.0",
"uuid": "3.3.2",
"vue-i18n": "8.10.0",
"vue-tel-input": "2.0.21",
"vue-tel-input": "2.0.22",
"vue-template-compiler": "2.6.10",
"vue-worker": "1.2.1",
"wallet-address-validator": "0.2.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
<a
:href="addressLink(details.to, details.toCurrency)"
target="_blank"
rel="noopener noreferrer"
>
{{ details.to }}
</a>
Expand All @@ -94,6 +95,7 @@
addressLink(details.providerAddress, details.fromCurrency)
"
target="_blank"
rel="noopener noreferrer"
>
{{ details.providerAddress }}
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,19 @@
</div>
</div>
</div>
<div class="tx-data tx-to">
<div v-if="hexToUtf8(messageToSign)" class="tx-data tx-to">
<div class="address-info">
<p class="title address-title">
{{ $t('interface.txSideMenuMessage') }}
</p>
<p class="message-to-sign">{{ hexToUtf8(messageToSign) }}</p>
</div>
</div>
<div class="tx-data tx-to">
<div class="address-info">
<p class="title address-title">
{{ $t('confirmation.messageInHex') }}
</p>
<p class="message-to-sign">{{ messageToSign }}</p>
</div>
</div>
Expand All @@ -54,9 +62,8 @@
href="https:/kb.myetherwallet.com"
target="_blank"
rel="noopener noreferrer"
>Learn more</a
>
Learn more
</a>
</p>
</div>
</div>
Expand All @@ -66,6 +73,7 @@

<script>
import Blockie from '@/components/Blockie';
import utils from 'web3-utils';
import { mapGetters } from 'vuex';
export default {
Expand Down Expand Up @@ -118,6 +126,13 @@ export default {
if (this.signedMessage !== '') {
this.confirmSignMessage();
}
},
hexToUtf8(hex) {
try {
return utils.hexToUtf8(hex);
} catch (e) {
return false;
}
}
}
};
Expand Down
6 changes: 5 additions & 1 deletion src/containers/FaqsContainer/FaqsContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@
>
<div class="qa-text">
{{ faqs[prop].content }}
<a :href="faqs[prop].link" target="_blank">
<a
:href="faqs[prop].link"
target="_blank"
rel="noopener noreferrer"
>
{{ faqs[prop].linkText }}
</a>
</div>
Expand Down
44 changes: 6 additions & 38 deletions src/containers/FooterContainer/FooterContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@
target="_blank"
rel="noopener noreferrer"
>
<p>{{ content.text }}</p>
<p v-if="item.class === 'e2'">
{{ $t(`${content.text}`) }}
</p>
<p v-else>{{ content.text }}</p>
</a>
</div>
</div>
Expand Down Expand Up @@ -136,6 +139,7 @@
import { mapGetters } from 'vuex';
import FeedbackModal from '@/components/FeedbackModal';
import CustomerSupport from '@/components/CustomerSupport';
import affiliates from './affiliates.js';
const version = VERSION;
export default {
Expand Down Expand Up @@ -199,43 +203,7 @@ export default {
{
class: 'e2',
title: this.$t('footer.affiliates'),
contents: [
{
text: this.$t('footer.ledger'),
href: 'https://www.ledger.com?r=fa4b'
},
{
text: this.$t('footer.finney'),
href:
'http://shop.sirinlabs.com?rfsn=2397639.54fdf&utm_source=refersion&utm_medium=affiliate&utm_campaign=2397639.54fdf'
},
{
text: this.$t('footer.digital'),
href: 'https://digitalbitbox.com/?ref=mew'
},
{
text: this.$t('footer.ethCard'),
href:
'https://ether.cards/?utm_source=mew&utm_medium=cpm&utm_campaign=site'
},
{
text: 'KeepKey',
href: 'http://keepkey.go2cloud.org/aff_c?offer_id=1&aff_id=5561'
},
{
text: this.$t('footer.trezor'),
href: 'https://trezor.io/?offer_id=12&aff_id=2029'
},
{
text: this.$t('footer.bity'),
href: 'https://bity.com/af/jshkb37v'
},
{
text: this.$t('footer.billfodl'),
href:
'https://billfodl.com/?afmc=2j&utm_campaign=2j&utm_source=leaddyno&utm_medium=affiliate'
}
]
contents: affiliates
},
{
class: 'e3',
Expand Down
Loading

0 comments on commit 86f474b

Please sign in to comment.