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

Release 0.2.16 #1583

Merged
merged 23 commits into from
May 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
76e815a
Loosen nvmrc (#1524)
rekmarks May 4, 2020
a5c3bf0
bugfix/check for sai method (#1545)
estebanmino May 4, 2020
6456dcc
update docs link in readme (#1521)
jennypollack May 4, 2020
ee152de
Add settings to nav bar (#1544)
rickycodes May 5, 2020
e16b294
Improvement/tx status notification (#1475)
estebanmino May 5, 2020
35b27c9
Transaction Header Component (#1487)
EtDu May 5, 2020
9b13054
Feature/block screenshots (#1495)
estebanmino May 5, 2020
94228fa
Detect if site has been added to Favorites (#1538)
rickycodes May 6, 2020
69d2889
Use "web-search" keyboardType on iOS (#1539)
rickycodes May 6, 2020
88592aa
Add new mobile provider (#1517)
rekmarks May 7, 2020
9c8eaef
Sig request design fixed (#1493)
EtDu May 7, 2020
a2a710a
Use gaba@1.11.0 (#1552)
whymarrh May 8, 2020
a016c96
Fix settings everywhere (#1556)
ibrahimtaveras00 May 11, 2020
424fb74
Fix day and month numbers in toDateFormat (#1557)
danjm May 12, 2020
97a5ee3
Make send flows consistent (#1465)
rickycodes May 12, 2020
b6cfb3b
Use setTimeout hack (again) to get paste context in token search (#1548)
rickycodes May 12, 2020
e7f30af
V0.2.16 (#1561)
estebanmino May 12, 2020
41479bb
Fix amount validation for large token payment requests (#1572)
danjm May 13, 2020
9598fa5
Fix validating of amount when sending a collectible (#1565)
danjm May 13, 2020
3ee315d
Ensure collectibles that use 'transfer' method show a fee in tx histo…
danjm May 13, 2020
1970969
Disable confirm screen edit button when no tokens of a payment reques…
danjm May 13, 2020
e6616ef
v0.2.16 changelog (#1575)
estebanmino May 13, 2020
496f85b
Instapay deposit navbar cancel (#1582)
estebanmino May 14, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v10.16.3
v10
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@

## Current Develop Branch

## v0.2.16 - May 15 2020
- [#1582](https://github.com/MetaMask/metamask-mobile/pull/1582): Instapay deposit navbar cancel (#1582)
- [#1570](https://github.com/MetaMask/metamask-mobile/pull/1570): Disable confirm screen edit button when no tokens of a payment request (#1570)
- [#1574](https://github.com/MetaMask/metamask-mobile/pull/1574): Ensure collectibles that use 'transfer' method show a fee in tx history list (#1574)
- [#1565](https://github.com/MetaMask/metamask-mobile/pull/1565): Fix validating of amount when sending a collectible (#1565)
- [#1572](https://github.com/MetaMask/metamask-mobile/pull/1572): Fix amount validation for large token payment requests (#1572)
- [#1561](https://github.com/MetaMask/metamask-mobile/pull/1561): V0.2.16 (#1561)
- [#1548](https://github.com/MetaMask/metamask-mobile/pull/1548): Use setTimeout hack (again) to get paste context in token search (#1548)
- [#1465](https://github.com/MetaMask/metamask-mobile/pull/1465): Make send flows consistent (#1465)
- [#1557](https://github.com/MetaMask/metamask-mobile/pull/1557): Fix day and month numbers in toDateFormat (#1557)
- [#1556](https://github.com/MetaMask/metamask-mobile/pull/1556): Fix settings everywhere (#1556)
- [#1552](https://github.com/MetaMask/metamask-mobile/pull/1552): Use gaba@1.11.0 (#1552)
- [#1493](https://github.com/MetaMask/metamask-mobile/pull/1493): Sig request design fixed (#1493)
- [#1517](https://github.com/MetaMask/metamask-mobile/pull/1517): Add new mobile provider (#1517)
- [#1539](https://github.com/MetaMask/metamask-mobile/pull/1539): Use "web-search" keyboardType on iOS (#1539)
- [#1538](https://github.com/MetaMask/metamask-mobile/pull/1538): Detect if site has been added to Favorites (#1538)
- [#1495](https://github.com/MetaMask/metamask-mobile/pull/1495): Feature/block screenshots (#1495)
- [#1487](https://github.com/MetaMask/metamask-mobile/pull/1487): Transaction Header Component (#1487)
- [#1475](https://github.com/MetaMask/metamask-mobile/pull/1475): Improvement/tx status notification (#1475)
- [#1544](https://github.com/MetaMask/metamask-mobile/pull/1544): Add settings to nav bar (#1544)
- [#1521](https://github.com/MetaMask/metamask-mobile/pull/1521): update docs link in readme (#1521)
- [#1545](https://github.com/MetaMask/metamask-mobile/pull/1545): bugfix/check for sai method (#1545)
- [#1524](https://github.com/MetaMask/metamask-mobile/pull/1524): Loosen nvmrc (#1524)

## v0.2.15 - May 1 2020
- [#1529](https://github.com/MetaMask/metamask-mobile/pull/1529): sentry android production (#1529)
- [#1528](https://github.com/MetaMask/metamask-mobile/pull/1528): Bugfix/sentry in circle ci (#1528)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ MetaMask is a mobile web browser that provides easy access to websites that use

For up to the minute news, follow our [Twitter](https://twitter.com/metamask_io) or [Medium](https://medium.com/metamask) pages.

To learn how to develop MetaMask-compatible applications, visit our [Developer Docs](https://metamask.github.io/metamask-docs/).
To learn how to develop MetaMask-compatible applications, visit our [Developer Docs](https://docs.metamask.io).

## MetaMask Mobile

Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ android {
applicationId "io.metamask"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 28
versionName "0.2.15"
versionCode 29
versionName "0.2.16"
multiDexEnabled true
testBuildType System.getProperty('testBuildType', 'debug')
missingDimensionStrategy "minReactNative", "minReactNative46"
Expand Down
4 changes: 3 additions & 1 deletion android/app/src/main/java/io/metamask/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import io.branch.rnbranch.RNBranchPackage;
import io.branch.rnbranch.RNBranchModule;
import io.metamask.nativeModules.RCTAnalyticsPackage;
import io.metamask.nativeModules.PreventScreenshotPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import cl.json.RNSharePackage;
import com.bitgo.randombytes.RandomBytesPackage;
Expand Down Expand Up @@ -74,7 +75,8 @@ protected List<ReactPackage> getPackages() {
new RNOSModule(),
new RNSharePackage(),
new VectorIconsPackage(),
new RCTAnalyticsPackage()
new RCTAnalyticsPackage(),
new PreventScreenshotPackage()
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package io.metamask.nativeModules;

import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.Promise;

import android.view.WindowManager;

import static com.facebook.react.bridge.UiThreadUtil.runOnUiThread;

public class PreventScreenshot extends ReactContextBaseJavaModule {
private static final String PREVENT_SCREENSHOT_ERROR_CODE = "PREVENT_SCREENSHOT_ERROR_CODE";
private final ReactApplicationContext reactContext;

PreventScreenshot(ReactApplicationContext context) {
super(context);
reactContext = context;
}

@Override
public String getName() {
return "PreventScreenshot";
}

@ReactMethod
public void forbid(Promise promise) {
runOnUiThread(new Runnable() {
@Override
public void run() {
try {
getCurrentActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
promise.resolve("Done. Screenshot taking locked.");
} catch(Exception e) {
promise.reject(PREVENT_SCREENSHOT_ERROR_CODE, "Forbid screenshot taking failure.");
}
}
});
}

@ReactMethod
public void allow(Promise promise) {
runOnUiThread(new Runnable() {
@Override
public void run() {
try {
getCurrentActivity().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
promise.resolve("Done. Screenshot taking unlocked.");
} catch (Exception e) {
promise.reject(PREVENT_SCREENSHOT_ERROR_CODE, "Allow screenshot taking failure.");
}
}
});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package io.metamask.nativeModules;

import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class PreventScreenshotPackage implements ReactPackage {

@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
return Collections.emptyList();
}

@Override
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
return Arrays.<NativeModule>asList(new PreventScreenshot(reactContext));
}
}
72 changes: 0 additions & 72 deletions app/actions/newTransaction/index.js

This file was deleted.

98 changes: 96 additions & 2 deletions app/actions/transaction/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,103 @@
import TransactionTypes from '../../core/TransactionTypes';

const {
ASSET: { ETH, ERC20, ERC721 }
} = TransactionTypes;

/**
* Clears transaction object completely
*/
export function newTransaction() {
export function resetTransaction() {
return {
type: 'RESET_TRANSACTION'
};
}

/**
* Starts a new transaction state with an asset
*
* @param {object} selectedAsset - Asset to start the transaction with
*/
export function newAssetTransaction(selectedAsset) {
return {
type: 'NEW_ASSET_TRANSACTION',
selectedAsset,
assetType: selectedAsset.isETH ? ETH : selectedAsset.tokenId ? ERC721 : ERC20
};
}

/**
* Sets transaction to address and ensRecipient in case is available
*
* @param {string} from - Address to send the transaction from
* @param {string} to - Address to send the transaction to
* @param {string} ensRecipient - Resolved ens name to send the transaction to
* @param {string} transactionToName - Resolved address book name for to address
* @param {string} transactionFromName - Resolved address book name for from address
*/
export function setRecipient(from, to, ensRecipient, transactionToName, transactionFromName) {
return {
type: 'SET_RECIPIENT',
from,
to,
ensRecipient,
transactionToName,
transactionFromName
};
}

/**
* Sets asset as selectedAsset
*
* @param {object} selectedAsset - Asset to start the transaction with
*/
export function setSelectedAsset(selectedAsset) {
return {
type: 'SET_SELECTED_ASSET',
selectedAsset,
assetType: selectedAsset.isETH ? ETH : selectedAsset.tokenId ? ERC721 : ERC20
};
}

/**
* Sets transaction object to be sent
*
* @param {object} transaction - Transaction object with from, to, data, gas, gasPrice, value
*/
export function prepareTransaction(transaction) {
return {
type: 'PREPARE_TRANSACTION',
transaction
};
}

/**
* Sets transaction object to be sent. All properties can be updated
*
* @param {object} config
* @param {object} config.transaction - Transaction object with from, to, data, gas, gasPrice, value
* @param {string} config.ensRecipient - Resolved ens name to send the transaction to
* @param {string} config.transactionToName - Resolved address book name for to address
* @param {string} config.transactionFromName - Resolved address book name for from address
* @param {object} config.selectedAsset - Asset to start the transaction with
* @param {string} config.assetType - The selectedAsset's type
*/
export function prepareFullTransaction({
transaction,
ensRecipient,
transactionToName,
transactionFromName,
selectedAsset,
assetType
}) {
return {
type: 'NEW_TRANSACTION'
type: 'PREPARE_FULL_TRANSACTION',
transaction,
ensRecipient,
transactionToName,
transactionFromName,
selectedAsset,
assetType
};
}

Expand Down
15 changes: 15 additions & 0 deletions app/actions/transactionNotification/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export function hideTransactionNotification() {
return {
type: 'HIDE_TRANSACTION_NOTIFICATION'
};
}

export function showTransactionNotification({ autodismiss, transaction, status }) {
return {
type: 'SHOW_TRANSACTION_NOTIFICATION',
isVisible: true,
autodismiss,
transaction,
status
};
}
Loading