Skip to content

Commit

Permalink
Release v2.1.0
Browse files Browse the repository at this point in the history
Release v2.1.0
  • Loading branch information
estebanmino authored Apr 12, 2021
2 parents 6868bd3 + 4a1c60d commit 95fe63b
Show file tree
Hide file tree
Showing 164 changed files with 18,678 additions and 5,964 deletions.
8 changes: 1 addition & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,7 @@ module.exports = {
}
],
'no-unsafe-negation': 2,
'no-unused-expressions': [
2,
{
allowTernary: true,
allowShortCircuit: true
}
],
'no-unused-expressions': 'off',
'no-use-before-define': [2, 'nofunc'],
'no-useless-call': 2,
'no-useless-computed-key': 2,
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,6 @@ coverage

# CocoaPods
/ios/Pods/

# Language files to add
/locales/languagesToUpdate/*.json
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# Changelog

## Current Develop Branch

## v2.1.0 - Apr 12 2021
- [#2487](https://github.com/MetaMask/metamask-mobile/pull/2487): Fix/analytics v1 priority1
- [#2456](https://github.com/MetaMask/metamask-mobile/pull/2456): Analytics v2 (priority 1)
- [#2408](https://github.com/MetaMask/metamask-mobile/pull/2408): Fix/gas estimations
- [#2479](https://github.com/MetaMask/metamask-mobile/pull/2479): remove controllers tgz
- [#2441](https://github.com/MetaMask/metamask-mobile/pull/2441): Improvement/assets by chainid
- [#2442](https://github.com/MetaMask/metamask-mobile/pull/2442): Improvement/chain ticker
- [#2372](https://github.com/MetaMask/metamask-mobile/pull/2372): Remove instapay
- [#2467](https://github.com/MetaMask/metamask-mobile/pull/2467): Fix iOS build
- [#2084](https://github.com/MetaMask/metamask-mobile/pull/2084): Migrate from AsyncStorage to FileStorage
- [#2443](https://github.com/MetaMask/metamask-mobile/pull/2443): Update terms and privacy links
- [#2318](https://github.com/MetaMask/metamask-mobile/pull/2318): Add custom network rpc API
- [#2306](https://github.com/MetaMask/metamask-mobile/pull/2306): Feature/high gas warn
- [#2463](https://github.com/MetaMask/metamask-mobile/pull/2463): update pods
- [#2448](https://github.com/MetaMask/metamask-mobile/pull/2448): Add resolution for netmask
- [#2445](https://github.com/MetaMask/metamask-mobile/pull/2445): Add resolution for y18n
- [#2404](https://github.com/MetaMask/metamask-mobile/pull/2404): Bump react-native-branch from 5.0.0 to 5.0.1
- [#2439](https://github.com/MetaMask/metamask-mobile/pull/2439): json-rpc-engine@6.1.0
- [#2413](https://github.com/MetaMask/metamask-mobile/pull/2413): remove "git add" per husky warning
- [#2431](https://github.com/MetaMask/metamask-mobile/pull/2431): Update BN import

## v2.0.1 - Mar 24 2021
- [#2430](https://github.com/MetaMask/metamask-mobile/pull/2430): Fix/send to style
- [#2426](https://github.com/MetaMask/metamask-mobile/pull/2426): bugfix/allow seedphrases when locked
- [#2422](https://github.com/MetaMask/metamask-mobile/pull/2422): bugfix/delete wallet with random password
- [#2417](https://github.com/MetaMask/metamask-mobile/pull/2417): Bugfix/sync improvements
- [#2418](https://github.com/MetaMask/metamask-mobile/pull/2418): V2 fixes
- [#2156](https://github.com/MetaMask/metamask-mobile/pull/2156): Translations with update script

## v2.0.0 - Mar 16 2021
- [#2383](https://github.com/MetaMask/metamask-mobile/pull/2383): swaps/received destination amount
- [#2379](https://github.com/MetaMask/metamask-mobile/pull/2379): Swaps/fix decode tx render amounts
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ android {
applicationId "io.metamask"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 48
versionName "2.0.0"
versionCode 50
versionName "2.1.0"
multiDexEnabled true
testBuildType System.getProperty('testBuildType', 'debug')
missingDimensionStrategy "minReactNative", "minReactNative46"
Expand Down
7 changes: 4 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildscript {
}
repositories {
google()
jcenter()
gradlePluginPortal()
}

dependencies {
Expand Down Expand Up @@ -46,8 +46,9 @@ allprojects {
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
jcenter()
maven { url 'https://www.jitpack.io' }
mavenCentral()
maven { url 'https://www.jitpack.io' }
gradlePluginPortal()
}

subprojects {
Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ android.disableResourceValidation=true
android.useAndroidX=true
android.enableJetifier=true
# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.54.0
FLIPPER_VERSION=0.82.0
107 changes: 106 additions & 1 deletion app/__mocks__/@react-native-community/async-storage.js
Original file line number Diff line number Diff line change
@@ -1 +1,106 @@
export default from '@react-native-community/async-storage/jest/async-storage-mock';
const _isObject = obj => typeof obj === 'object' && !Array.isArray(obj);
const _deepMergeInto = (oldObject, newObject) => {
const newKeys = Object.keys(newObject);
const mergedObject = oldObject;

newKeys.forEach(key => {
const oldValue = mergedObject[key];
const newValue = newObject[key];

if (_isObject(oldValue) && _isObject(newValue)) {
mergedObject[key] = _deepMergeInto(oldValue, newValue);
} else {
mergedObject[key] = newValue;
}
});

return mergedObject;
};

const asMock = {
__INTERNAL_MOCK_STORAGE__: {},

setItem: async (key, value, callback) => {
const setResult = await asMock.multiSet([[key, value]], undefined);

callback && callback(setResult);
return setResult;
},

getItem: async (key, callback) => {
const getResult = await asMock.multiGet([key], undefined);

const result = getResult[0] ? getResult[0][1] : null;

callback && callback(null, result);
return result;
},

removeItem: (key, callback) => asMock.multiRemove([key], callback),
mergeItem: (key, value, callback) => asMock.multiMerge([[key, value]], callback),

clear: _clear,
getAllKeys: _getAllKeys,
flushGetRequests: () => null,

multiGet: _multiGet,
multiSet: _multiSet,
multiRemove: _multiRemove,
multiMerge: _multiMerge
};

async function _multiSet(keyValuePairs, callback) {
keyValuePairs.forEach(keyValue => {
const key = keyValue[0];

asMock.__INTERNAL_MOCK_STORAGE__[key] = keyValue[1];
});
callback && callback(null);
return null;
}

async function _multiGet(keys, callback) {
const values = keys.map(key => [key, asMock.__INTERNAL_MOCK_STORAGE__[key] || null]);
callback && callback(null, values);

return values;
}

async function _multiRemove(keys, callback) {
keys.forEach(key => {
if (asMock.__INTERNAL_MOCK_STORAGE__[key]) {
delete asMock.__INTERNAL_MOCK_STORAGE__[key];
}
});

callback && callback(null);
return null;
}

async function _clear(callback) {
asMock.__INTERNAL_MOCK_STORAGE__ = {};

callback && callback(null);

return null;
}

async function _getAllKeys() {
return Object.keys(asMock.__INTERNAL_MOCK_STORAGE__);
}

async function _multiMerge(keyValuePairs, callback) {
keyValuePairs.forEach(keyValue => {
const key = keyValue[0];
const value = JSON.parse(keyValue[1]);

const oldValue = JSON.parse(asMock.__INTERNAL_MOCK_STORAGE__[key]);

asMock.__INTERNAL_MOCK_STORAGE__[key] = JSON.stringify(_deepMergeInto(oldValue, value));
});

callback && callback(null);
return null;
}

export default asMock;
19 changes: 19 additions & 0 deletions app/__mocks__/rn-fetch-blob.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const noop = () => ({});

export default {
DocumentDir: noop,
fetch: noop,
base64: noop,
android: noop,
ios: noop,
config: noop,
session: noop,
fs: {
exists: () => Promise.resolve(),
dirs: {
CacheDir: noop,
DocumentDir: noop
}
},
wrap: noop
};
7 changes: 0 additions & 7 deletions app/actions/settings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ export function setPrimaryCurrency(primaryCurrency) {
};
}

export function setEnablePaymentChannels(paymentChannelsEnabled) {
return {
type: 'SET_ENABLE_PAYMENT_CHANNELS',
paymentChannelsEnabled
};
}

export function setUseBlockieIcon(useBlockieIcon) {
return {
type: 'SET_USE_BLOCKIE_ICON',
Expand Down
12 changes: 0 additions & 12 deletions app/actions/transaction/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,6 @@ export function prepareFullTransaction({
};
}

/**
* Sets any attribute in transaction object
*
* @param {object} transaction - New transaction object
*/
export function setPaymentChannelTransaction(asset) {
return {
type: 'SET_PAYMENT_CHANNEL_TRANSACTION',
asset
};
}

/**
* Sets any attribute in transaction object
*
Expand Down
5 changes: 3 additions & 2 deletions app/actions/user/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ export function protectWalletModalNotVisible() {
};
}

export function loadingSet() {
export function loadingSet(loadingMsg) {
return {
type: 'LOADING_SET'
type: 'LOADING_SET',
loadingMsg
};
}

Expand Down
9 changes: 9 additions & 0 deletions app/components/Base/Text.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ const style = StyleSheet.create({
},
underline: {
textDecorationLine: 'underline'
},
noMargin: {
marginVertical: 0
}
});

Expand All @@ -64,6 +67,7 @@ const Text = ({
strikethrough,
underline,
style: externalStyle,
noMargin,
...props
}) => (
<RNText
Expand All @@ -81,6 +85,7 @@ const Text = ({
link && style.link,
strikethrough && style.strikethrough,
underline && style.underline,
noMargin && style.noMargin,
externalStyle
]}
{...props}
Expand Down Expand Up @@ -159,6 +164,10 @@ Text.propTypes = {
* Applies a underline decoration
*/
underline: PropTypes.bool,
/**
* Removes the vertical margin
*/
noMargin: PropTypes.bool,
/**
* Any other external style defined in props will be applied
*/
Expand Down
4 changes: 0 additions & 4 deletions app/components/Nav/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import ManualBackupStep1 from '../../Views/ManualBackupStep1';
import ManualBackupStep2 from '../../Views/ManualBackupStep2';
import ManualBackupStep3 from '../../Views/ManualBackupStep3';
import ImportFromSeed from '../../Views/ImportFromSeed';
import SyncWithExtension from '../../Views/SyncWithExtension';
import SyncWithExtensionSuccess from '../../Views/SyncWithExtensionSuccess';
import Entry from '../../Views/Entry';
import LockScreen from '../../Views/LockScreen';
Expand Down Expand Up @@ -66,9 +65,6 @@ const OnboardingNav = createStackNavigator(
ImportFromSeed: {
screen: ImportFromSeed
},
SyncWithExtension: {
screen: SyncWithExtension
},
OptinMetrics: {
screen: OptinMetrics
}
Expand Down
4 changes: 0 additions & 4 deletions app/components/Nav/Main/MainNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import NetworkSettings from '../../Views/Settings/NetworksSettings/NetworkSettin
import AppInformation from '../../Views/Settings/AppInformation';
import Contacts from '../../Views/Settings/Contacts';
import Wallet from '../../Views/Wallet';
import SyncWithExtension from '../../Views/SyncWithExtension';
import Asset from '../../Views/Asset';
import AddAsset from '../../Views/AddAsset';
import Collectible from '../../Views/Collectible';
Expand Down Expand Up @@ -153,9 +152,6 @@ export default createStackNavigator(
ContactForm: {
screen: ContactForm
},
SyncWithExtensionView: {
screen: SyncWithExtension
},
RevealPrivateCredentialView: {
screen: RevealPrivateCredential
},
Expand Down
2 changes: 0 additions & 2 deletions app/components/Nav/Main/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ exports[`Main should render correctly 1`] = `
"RevealPrivateCredentialView": null,
"SecuritySettings": null,
"Settings": null,
"SyncWithExtensionView": null,
"WalletConnectSessionsView": null,
},
"getActionCreators": [Function],
Expand Down Expand Up @@ -569,7 +568,6 @@ exports[`Main should render correctly 1`] = `
"RevealPrivateCredentialView": null,
"SecuritySettings": null,
"Settings": null,
"SyncWithExtensionView": null,
"WalletConnectSessionsView": null,
},
"getActionCreators": [Function],
Expand Down
Loading

0 comments on commit 95fe63b

Please sign in to comment.