Skip to content

Commit

Permalink
Merge from main
Browse files Browse the repository at this point in the history
  • Loading branch information
Cal-L committed Mar 9, 2022
2 parents cb98bc8 + 2fc4a3d commit 0dca09d
Show file tree
Hide file tree
Showing 33 changed files with 536 additions and 1,575 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/crowdin_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ jobs:
with:
upload_translations: true
download_translations: true
github_user_name: metamaskbot
github_user_email: [email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: metamaskbot
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
# Changelog

## Current Develop Branch
## v4.2.2 - February 24, 2022
- [#3841](https://github.com/MetaMask/metamask-mobile/pull/3841): [FIX] Fix custom network icons on Wallet Overview
- [#3839](https://github.com/MetaMask/metamask-mobile/pull/3839): [FIX] Update en.json
- [#3838](https://github.com/MetaMask/metamask-mobile/pull/3838): [FIX] Fix onramp BUSD address. Add wc_description string
- [#3811](https://github.com/MetaMask/metamask-mobile/pull/3811): [FIX] Problem when loading unknown icons on Swap token list
- [#3791](https://github.com/MetaMask/metamask-mobile/pull/3791): [FIX] Update style of ErrorMessage
- [#3797](https://github.com/MetaMask/metamask-mobile/pull/3797): [ENHANCEMENT] Add Fantom FTM and Celo CELO — Add token after fiat on ramp order
- [#3685](https://github.com/MetaMask/metamask-mobile/pull/3685): [ENHANCEMENT] WalletConnect, Deeplink and RPC methods refactors
- [#3766](https://github.com/MetaMask/metamask-mobile/pull/3766): [ENHANCEMENT] Swaps: Add Avalanche
- [#3806](https://github.com/MetaMask/metamask-mobile/pull/3806): [FIX] Custom network token crash
- [#3547](https://github.com/MetaMask/metamask-mobile/pull/3547): [IMPROVEMENT] Warn when exporting SRP
- [#3788](https://github.com/MetaMask/metamask-mobile/pull/3788): [UPGRADE] Bump url-parse from 1.5.2 to 1.5.9
- [#3764](https://github.com/MetaMask/metamask-mobile/pull/3764): [UPGRADE] Bump vm2 from 3.9.5 to 3.9.8
- [#3787](https://github.com/MetaMask/metamask-mobile/pull/3787): [FIX] Default spent limit value
- [#3774](https://github.com/MetaMask/metamask-mobile/pull/3774): [FIX] Address book e2e
- [#3770](https://github.com/MetaMask/metamask-mobile/pull/3770): [FIX] Delete wallet e2e
- [#3767](https://github.com/MetaMask/metamask-mobile/pull/3767): [FIX] Edit contact e2e
- [#3762](https://github.com/MetaMask/metamask-mobile/pull/3762): [ENHANCEMENT] Enhance auto-detection warning
- [#3618](https://github.com/MetaMask/metamask-mobile/pull/3618): [FIX] Modal view when adding wallet address to address book
- [#3724](https://github.com/MetaMask/metamask-mobile/pull/3724): [ENHANCEMENT] Update texts to use lock/unlock terminology
- [#3701](https://github.com/MetaMask/metamask-mobile/pull/3701): [FIX] Make selected option comes first in picker component on Android
- [#3752](https://github.com/MetaMask/metamask-mobile/pull/3752): [FIX] Fix OpenSea typo
- [#3548](https://github.com/MetaMask/metamask-mobile/pull/3548): [FIX] Fixes text field frame got cut off
- [#3690](https://github.com/MetaMask/metamask-mobile/pull/3690): [FIX] Revert svg crash

## v4.1.1 - February 23, 2022
- [3810](https://github.com/MetaMask/metamask-mobile/pull/3810) [FIX] Avalanche token crash
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ android {
applicationId "io.metamask"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 827
versionName "4.1.1"
versionCode 834
versionName "4.2.2"
multiDexEnabled true
testBuildType System.getProperty('testBuildType', 'debug')
missingDimensionStrategy "minReactNative", "minReactNative46"
Expand Down
1 change: 1 addition & 0 deletions app/actions/browser/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export function addToHistory({ url, name }) {
export function clearHistory() {
return {
type: 'CLEAR_BROWSER_HISTORY',
id: Date.now(),
};
}

Expand Down
19 changes: 17 additions & 2 deletions app/components/UI/ApproveTransactionReview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ class ApproveTransactionReview extends PureComponent {
* Whether the transaction was confirmed or not
*/
transactionConfirmed: PropTypes.bool,
/**
* Dispatch set transaction object from transaction action
*/
setTransactionObject: PropTypes.func,
};

state = {
Expand Down Expand Up @@ -436,6 +440,7 @@ class ApproveTransactionReview extends PureComponent {
} = this.state;

try {
const { setTransactionObject } = this.props;
const uint = toTokenMinimalUnit(
spendLimitUnlimitedSelected ? originalApproveAmount : spendLimitCustomValue,
token.decimals
Expand All @@ -445,7 +450,15 @@ class ApproveTransactionReview extends PureComponent {
spender: spenderAddress,
value: Number(uint).toString(16),
});
const newApprovalTransaction = { ...transaction, data: approvalData };
const newApprovalTransaction = {
...transaction,
data: approvalData,
transaction: {
...transaction.transaction,
data: approvalData,
},
};

setTransactionObject(newApprovalTransaction);
} catch (err) {
Logger.log('Failed to setTransactionObject', err);
Expand Down Expand Up @@ -669,8 +682,10 @@ class ApproveTransactionReview extends PureComponent {
originalApproveAmount,
spendLimitUnlimitedSelected,
spendLimitCustomValue,
transaction: { to, data },
} = this.state;
const {
transaction: { to, data },
} = this.props;
const allowance = (!spendLimitUnlimitedSelected && spendLimitCustomValue) || originalApproveAmount;
return (
<TransactionReviewDetailsCard
Expand Down
5 changes: 4 additions & 1 deletion app/components/UI/PaymentRequest/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ const createStyles = (colors) =>
fontSize: 16,
color: colors.text.default,
},
amountWrapper: {
marginVertical: 8,
},
searchWrapper: {
marginVertical: 8,
borderColor: colors.border.default,
Expand Down Expand Up @@ -622,7 +625,7 @@ class PaymentRequest extends PureComponent {
<View>
<Text style={styles.title}>{strings('payment_request.enter_amount')}</Text>
</View>
<View style={styles.searchWrapper}>
<View style={styles.amountWrapper}>
<View style={styles.container}>
<View style={styles.ethContainer}>
<View style={styles.amounts}>
Expand Down
7 changes: 4 additions & 3 deletions app/components/UI/Swaps/components/TokenIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ EmptyIcon.propTypes = {
};

function TokenIcon({ symbol, icon, medium, big, biggest, style }) {
const [showFallback, setShowFallback] = useState(null);
const [showFallback, setShowFallback] = useState(false);
const { colors } = useAppThemeFromContext() || mockColors;
const styles = createStyles(colors);

Expand All @@ -106,10 +106,11 @@ function TokenIcon({ symbol, icon, medium, big, biggest, style }) {
return { uri: icon };
}

return { uri: null };
return null;
}, [symbol, icon]);
const source = getSource();

if (!showFallback) {
if (source && !showFallback) {
return (
<RemoteImage
fadeIn
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`TokenIcon component should Render correctly 1`] = `
<RemoteImage
fadeIn={true}
onError={[Function]}
source={
Object {
"uri": null,
}
}
style={
Array [
Object {
"borderRadius": 12,
"height": 24,
"width": 24,
},
undefined,
undefined,
undefined,
undefined,
]
}
/>
`;
exports[`TokenIcon component should Render correctly 1`] = `<EmptyIcon />`;

exports[`TokenIcon component should Render correctly 2`] = `
<RemoteImage
Expand Down Expand Up @@ -51,28 +28,40 @@ exports[`TokenIcon component should Render correctly 2`] = `
`;

exports[`TokenIcon component should Render correctly 3`] = `
<RemoteImage
fadeIn={true}
onError={[Function]}
source={
Object {
"uri": null,
<EmptyIcon>
<Text
black={false}
blue={false}
bold={false}
centered={false}
disclaimer={false}
green={false}
link={false}
modal={false}
primary={false}
red={false}
reset={false}
right={false}
small={false}
strikethrough={false}
style={
Array [
Object {
"fontSize": 16,
"textAlign": "center",
"textAlignVertical": "center",
},
undefined,
undefined,
undefined,
]
}
}
style={
Array [
Object {
"borderRadius": 12,
"height": 24,
"width": 24,
},
undefined,
undefined,
undefined,
undefined,
]
}
/>
underline={false}
upper={false}
>
C
</Text>
</EmptyIcon>
`;

exports[`TokenIcon component should Render correctly 4`] = `
Expand Down Expand Up @@ -101,31 +90,8 @@ exports[`TokenIcon component should Render correctly 4`] = `
`;

exports[`TokenIcon component should Render correctly 5`] = `
<RemoteImage
fadeIn={true}
onError={[Function]}
source={
Object {
"uri": null,
}
}
style={
Array [
Object {
"borderRadius": 12,
"height": 24,
"width": 24,
},
Object {
"borderRadius": 18,
"height": 36,
"width": 36,
},
undefined,
undefined,
undefined,
]
}
<EmptyIcon
medium={true}
/>
`;

Expand Down Expand Up @@ -159,32 +125,44 @@ exports[`TokenIcon component should Render correctly 6`] = `
`;

exports[`TokenIcon component should Render correctly 7`] = `
<RemoteImage
fadeIn={true}
onError={[Function]}
source={
Object {
"uri": null,
<EmptyIcon
medium={true}
>
<Text
black={false}
blue={false}
bold={false}
centered={false}
disclaimer={false}
green={false}
link={false}
modal={false}
primary={false}
red={false}
reset={false}
right={false}
small={false}
strikethrough={false}
style={
Array [
Object {
"fontSize": 16,
"textAlign": "center",
"textAlignVertical": "center",
},
Object {
"fontSize": 22,
},
undefined,
undefined,
]
}
}
style={
Array [
Object {
"borderRadius": 12,
"height": 24,
"width": 24,
},
Object {
"borderRadius": 18,
"height": 36,
"width": 36,
},
undefined,
undefined,
undefined,
]
}
/>
underline={false}
upper={false}
>
C
</Text>
</EmptyIcon>
`;

exports[`TokenIcon component should Render correctly 8`] = `
Expand Down
Loading

0 comments on commit 0dca09d

Please sign in to comment.