diff --git a/app/components/UI/TransactionNotification/index.js b/app/components/UI/TransactionNotification/index.js index 8b7678eef39..6144f88908e 100644 --- a/app/components/UI/TransactionNotification/index.js +++ b/app/components/UI/TransactionNotification/index.js @@ -1,5 +1,5 @@ import React, { Fragment } from 'react'; -import { StyleSheet, View, Text, TouchableOpacity } from 'react-native'; +import { TouchableOpacity, StyleSheet, View, Text } from 'react-native'; import PropTypes from 'prop-types'; import { colors, baseStyles, fontStyles } from '../../../styles/common'; import ElevatedView from 'react-native-elevated-view'; @@ -9,6 +9,7 @@ import DeviceSize from '../../../util/DeviceSize'; import AnimatedSpinner from '../AnimatedSpinner'; import { hideMessage } from 'react-native-flash-message'; import { strings } from '../../../../locales/i18n'; +import GestureRecognizer from 'react-native-swipe-gestures'; const styles = StyleSheet.create({ defaultFlashFloating: { @@ -115,9 +116,23 @@ export const TransactionNotification = props => { return ( - - {this._getContent()} - + hideMessage()} + config={{ + velocityThreshold: 0.2, + directionalOffsetThreshold: 50 + }} + style={baseStyles.flex} + > + + {this._getContent()} + + ); }; diff --git a/package-lock.json b/package-lock.json index 0001b9bb2e1..500832f6d32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6431,12 +6431,12 @@ "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz", "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=", "requires": { - "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb", + "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git", "ethereumjs-util": "^5.1.1" } }, "ethereumjs-abi": { - "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb", + "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#572d4bafe08a8a231137e1f9daeb0f8a23f197d2", "from": "git+https://github.com/ethereumjs/ethereumjs-abi.git", "requires": { "bn.js": "^4.11.8", @@ -7755,7 +7755,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -7773,11 +7774,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -7790,15 +7793,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -7901,7 +7907,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -7911,6 +7918,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -7923,17 +7931,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -7950,6 +7961,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -8028,7 +8040,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -8038,6 +8051,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -8113,7 +8127,8 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -8143,6 +8158,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -8160,6 +8176,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -8198,11 +8215,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true + "bundled": true, + "optional": true } } }, @@ -15974,6 +15993,11 @@ "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-9.3.3.tgz", "integrity": "sha512-BpZnKk73M6VH56iE/+qNQObzhj2wvm2YlPDvT4Z9DTuMjCAnnktrfw5rGgW83dg21unyMGHwm9bvkwgDV975cA==" }, + "react-native-swipe-gestures": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/react-native-swipe-gestures/-/react-native-swipe-gestures-1.0.3.tgz", + "integrity": "sha512-KOouRzPB2fHFjVombsSdRfYo8SFeNVa4Ho4B5il87DuuF26sPNOtb3je+qaT/xVptedOsCzRPJGbWFMsaBApgg==" + }, "react-native-tab-view": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/react-native-tab-view/-/react-native-tab-view-1.3.2.tgz", @@ -18495,7 +18519,7 @@ "resolved": "https://registry.npmjs.org/web3/-/web3-0.20.7.tgz", "integrity": "sha512-VU6/DSUX93d1fCzBz7WP/SGCQizO1rKZi4Px9j/3yRyfssHyFcZamMw2/sj4E8TlfMXONvZLoforR8B4bRoyTQ==", "requires": { - "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934", + "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git", "crypto-js": "^3.1.4", "utf8": "^2.1.1", "xhr2-cookies": "^1.1.0", @@ -18539,12 +18563,12 @@ "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz", "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=", "requires": { - "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb", + "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git", "ethereumjs-util": "^5.1.1" } }, "ethereumjs-abi": { - "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb", + "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#572d4bafe08a8a231137e1f9daeb0f8a23f197d2", "from": "git+https://github.com/ethereumjs/ethereumjs-abi.git", "requires": { "bn.js": "^4.11.8", diff --git a/package.json b/package.json index 139f3d5614a..145620795be 100644 --- a/package.json +++ b/package.json @@ -113,6 +113,7 @@ "react-native-search-api": "1.2.0", "react-native-share": "1.1.3", "react-native-svg": "9.3.3", + "react-native-swipe-gestures": "1.0.3", "react-native-vector-icons": "6.3.0", "react-native-view-shot": "2.5.0", "react-native-web3-webview": "1.3.1",