Skip to content

Commit

Permalink
Sync with develop, revert web3 changes as it breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
gamalielhere committed Jun 3, 2020
2 parents 35c2142 + f88e547 commit b444657
Show file tree
Hide file tree
Showing 33 changed files with 2,511 additions and 3,687 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/deploy-live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ jobs:
SENTRY_ORG: myetherwallet-inc
run: |
curl -sL https://sentry.io/get-cli/ | bash
VERSION=${{ steps.get_release_tag.outputs.VERSION }}
sentry-cli releases new -p myetherwallet $VERSION
sentry-cli releases files $VERSION upload-sourcemaps ./dist/sourcemaps
sentry-cli releases set-commits $VERSION --auto
sentry-cli releases finalize $VERSION
TAG=${{ steps.get_release_tag.outputs.VERSION }}
RELEASE=${TAG//v/}
sentry-cli releases new -p myetherwallet $RELEASE
sentry-cli releases files $RELEASE upload-sourcemaps ./dist/sourcemaps
sentry-cli releases set-commits $RELEASE --auto
sentry-cli releases finalize $RELEASE
- name: deploy to production
env:
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
### Release v5.6.3
### Feature

- Unstoppable domains combined [#2353](https://github.com/MyEtherWallet/MyEtherWallet/pull/2353)

### Release v5.6.3

### Bug

- Sentry fixes y [#2400](https://github.com/MyEtherWallet/MyEtherWallet/pull/2400)
- Sentry fixes j [#2396](https://github.com/MyEtherWallet/MyEtherWallet/pull/2396)
- Fix address not getting returned for unable to validate addresses and disable swap when recalculating rates[#2397](https://github.com/MyEtherWallet/MyEtherWallet/pull/2397)
- Fix errors from sentry [#2393](https://github.com/MyEtherWallet/MyEtherWallet/pull/2393)
- Fix perkle network connection [#2389](https://github.com/MyEtherWallet/MyEtherWallet/pull/2389)
- Fix errors from sentry [#2388](https://github.com/MyEtherWallet/MyEtherWallet/pull/2388)

### Devop

- Fix MEW CX build [#2403](https://github.com/MyEtherWallet/MyEtherWallet/pull/2403)
- Update terms of service [#2394](https://github.com/MyEtherWallet/MyEtherWallet/pull/2394)
- Fix sentry releases [#2395](https://github.com/MyEtherWallet/MyEtherWallet/pull/2395)

Expand Down
5,826 changes: 2,278 additions & 3,548 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion package-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ const EXCEPTIONS = [
'@vue/test-utils',
'graphql',
'@myetherwallet/eth-token-balance',
'@makerdao/dai'
'@makerdao/dai',
'bootstrap-vue',
'web3',
'web3-core-helpers',
'web3-core-method',
'web3-core-requestmanager',
'web3-utils'
];
const CUSTOM_DIST = {
['babel-core']: 'bridge'
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,11 @@
"vue-template-compiler": "2.6.11",
"vue-worker": "1.2.1",
"wallet-address-validator": "0.2.4",
"web3": "1.2.8",
"web3-core-helpers": "1.2.8",
"web3-core-method": "1.2.8",
"web3-core-requestmanager": "1.2.8",
"web3-utils": "1.2.8",
"web3": "1.2.7",
"web3-core-helpers": "1.2.7",
"web3-core-method": "1.2.7",
"web3-core-requestmanager": "1.2.7",
"web3-utils": "1.2.7",
"webpack": "4.43.0",
"weekstart": "1.0.1",
"worker-loader": "2.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/builds/mewcx/cxHelpers/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { isAddress, toChecksumAddress } from '@/helpers/addressUtils';
import Misc from '@/helpers/misc';
import { extractRootDomain } from './extractRootDomain';
import MiddleWare from '@/wallets/web3-provider/middleware';
import localStorage from 'store';
import {
mewCxFetchAccounts,
mewCxSignTx,
Expand Down
4 changes: 4 additions & 0 deletions src/dapps/Aave/Aave.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
grid-area: main;
overflow: hidden;

.back-btn {
display: block;
}

.header-container {
border-bottom: 2px solid $light-grey-1;
}
Expand Down
1 change: 1 addition & 0 deletions src/dapps/Aave/Aave.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
</div>
<back-button
v-if="$route.fullPath !== '/interface/dapps/aave/action'"
class="back-btn"
:title="$t('common.exit-dapp')"
:hide-border="true"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@
}
}

.divider {
margin-bottom: 2.5rem;
}

.btn-container {
text-align: center;
button {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
<p class="mt-4">{{ rateType }}</p>
</div>
</div>
<hr class="mt-4 mb-4" />
<hr class="mt-4 divider" />
<div class="btn-container">
<p v-if="isDisabled() && errorMsg" class="error-msg">
{{ errorMsg }}
Expand Down
17 changes: 10 additions & 7 deletions src/dapps/Aave/containers/ActionContainer/ActionContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
<p class="token-balance">
{{
activeDepositTab
? convertToFixed(token.user.principalATokenBalance)
: convertToFixed(token.user.currentBorrows)
? convertToFixed(userToken.principalATokenBalance)
: convertToFixed(userToken.currentBorrows)
}}
<span class="token-name"> {{ token.symbol }} </span>
</p>
<p class="usd-amt">
${{
activeDepositTab
? convertToFixed(token.user.currentUnderlyingBalanceUSD)
: convertToFixed(token.user.currentBorrowsUSD)
? convertToFixed(userToken.currentUnderlyingBalanceUSD)
: convertToFixed(userToken.currentBorrowsUSD)
}}
</p>
</div>
Expand Down Expand Up @@ -160,6 +160,7 @@ export default {
amount: null,
ethPrice: 0,
disableBtn: false,
userToken: {},
token: { user: {}, price: {} },
actionType: null,
percentBtns: {
Expand Down Expand Up @@ -196,9 +197,9 @@ export default {
this.token.price.priceInEth
);
} else if (this.actionTitle === this.actionTitles.repay) {
return this.token.user.currentBorrows;
return this.userToken.currentBorrows;
} else if (this.actionTitle === this.actionTitles.withdraw) {
return this.token.user.principalATokenBalance;
return this.userToken.principalATokenBalance;
}
return false;
}
Expand All @@ -210,7 +211,7 @@ export default {
amount: this.convertToFixed(this.amountToCheck)
});
} else if (
this.amount === this.token.user.currentBorrows &&
this.amount === this.userToken.currentBorrows &&
this.amount > this.token.tokenBalance
) {
this.errorMsg = this.$t('dappsAave.cannot-exceed-tkn-bal', {
Expand All @@ -231,6 +232,8 @@ export default {
if (this.online) {
this.getEthPrice();
}
this.userToken = this.token.user ? this.token.user : {};
},
methods: {
...mapActions('aave', ['setToken']),
Expand Down
4 changes: 2 additions & 2 deletions src/dapps/ManageENS/ManageENS.vue
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export default {
);
},
parsedTld() {
if (this.parsedHostName.length) {
if (this.parsedHostName && this.parsedHostName.length) {
const hasTld = this.domainName.lastIndexOf('.');
return hasTld > -1
? this.domainName.substr(hasTld + 1, this.domainName.length)
Expand All @@ -190,7 +190,7 @@ export default {
return '';
},
parsedHostName() {
if (this.domainName.length) {
if (this.domainName && this.domainName.length) {
return this.domainName.substr(
0,
this.domainName.lastIndexOf('.') > -1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,9 @@ export default {
this.txtRecordInputs[type] !== '' &&
!this.txtValidators[type](this.txtRecordInputs[type])
)
return false;
return true;
}
return true;
return false;
}
},
watch: {
Expand Down
1 change: 1 addition & 0 deletions src/dapps/ManageENS/supportedCoins.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class MValidator {
this.type = type;
}
validate(address) {
if (!address) return false;
return MultiCoinValidator.validate(address, this.type);
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/dapps/ManageENS/supportedTxt.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const isUrl = function (input) {
};

const isEmail = function (input) {
if (!input) return false;
const atIndex = input.indexOf('@');
const parsedEmailName = normalise(input.substr(0, atIndex));
const parsedEmailHost = normalise(input.substr(atIndex + 1, input.length));
Expand All @@ -22,11 +23,13 @@ const isEmail = function (input) {
};

const isString = function (input) {
if (!input) return false;
const parsedInput = normalise(input);
return typeof parsedInput === 'string';
};

const isHandle = function (input) {
if (!input) return false;
const atIndex = input.indexOf('@');
const parsedInput = normalise(input.substr(atIndex + 1, input.length));
if (!isString(parsedInput)) return false;
Expand Down
1 change: 1 addition & 0 deletions src/directives/AddrResolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ const AddrResolver = {
} catch (e) {
if (e.message.includes('Missing validator for currency: ')) {
_this.isValidAddress = true;
_this.hexAddress = domain;
errorPar.innerText = _this.$t('swap.warning.unable-validate-addr', {
currency: parentCurrency
});
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const toBuffer = v => {
const capitalize = value => {
if (!value) return '';
value = value.toString();
return value.charAt(0).toUpperCase() + value.slice(1);
return value.charAt(0).toUpperCase() + value.substr(1, value.length);
};
/* Accepts string, returns boolean */
const isJson = str => {
Expand Down
3 changes: 2 additions & 1 deletion src/helpers/responseHandler/responseMatches.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"kyber-gasLimit-list-update-failed": "swap.warning.kyber-gasLimit-list-update-failed",
"kyber-list-update-failed": "swap.warning.kyber-list-update-failed",
"Error retrieving trade, try a different dex": "swap.warning.dexag-cannot-complete",
"gas-too-high": "swap.warning.gas-too-high"
"gas-too-high": "swap.warning.gas-too-high",
"bity-rate-failed": "swap.notice.bity-rate-failed"
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,20 @@ export default {
};
},
mounted() {
isSupported().then(res => {
this.items.forEach(item => {
const u2fhw = [BITBOX_TYPE];
isSupported()
.then(res => {
this.items.forEach(item => {
const u2fhw = [BITBOX_TYPE];
if (u2fhw.includes(item.name)) {
item.disabled = !res;
item.msg = !res ? 'errorsGlobal.browser-non-u2f' : '';
}
if (u2fhw.includes(item.name)) {
item.disabled = !res;
item.msg = !res ? 'errorsGlobal.browser-non-u2f' : '';
}
});
})
.catch(e => {
BitBox02Wallet.errorHandler(e);
});
});
this.$refs.bitboxSelect.$on('hidden', () => {
this.selected = '';
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import printJS from 'print-js';
import html2canvas from 'html2canvas';
import MnemonicTableToPrint from './components/MnemonicTableToPrint';
import MnemonicTableToDisplay from './components/MnemonicTableToDisplay';
import { Toast } from '@/helpers';
export default {
components: {
Expand Down Expand Up @@ -72,20 +73,25 @@ export default {
},
methods: {
async print() {
const element = this.$refs.printContainer;
const screen = await html2canvas(element, {
async: true,
logging: false,
height: 800,
width: 800,
scrollY: 0
}).then(canvas => {
return canvas;
});
printJS({
printable: screen.toDataURL('image/png'),
type: 'image'
});
try {
const element = this.$refs.printContainer;
const screen = await html2canvas(element, {
async: true,
logging: false,
height: 800,
width: 800,
scrollY: 0
});
printJS({
printable: screen.toDataURL('image/png'),
type: 'image'
});
} catch (e) {
Toast.responseHandler(
this.$t('errorsGlobal.print-support-error'),
Toast.ERROR
);
}
}
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ import { Misc, Toast } from '@/helpers';
import { isAddress } from '@/helpers/addressUtils';
import * as unit from 'ethjs-unit';
import store from 'store';
import BigNumber from 'bignumber.js';
export default {
components: {
Expand Down Expand Up @@ -340,6 +341,9 @@ export default {
_contractArgs.push(parsedItem);
} else if (item.type === 'address') {
_contractArgs.push(this.inputs[item.name].toLowerCase().trim());
} else if (item.includes === 'uint') {
const number = new BigNumber(this.inputs[item.name].trim());
_contractArgs.push(number.toFixed());
} else {
_contractArgs.push(this.inputs[item.name]);
}
Expand Down Expand Up @@ -435,7 +439,8 @@ export default {
switch (direction) {
case 'forward':
if (this.abi !== '') {
JSON.parse(this.abi).forEach(item => {
const jsonAbi = JSON.parse(this.abi) ? JSON.parse(this.abi) : [];
jsonAbi.forEach(item => {
if (item.type !== 'constructor' && item.constant !== undefined) {
this.contractMethods.push(item);
}
Expand Down
Loading

0 comments on commit b444657

Please sign in to comment.