Merge pull request #4640 from BlueWallet/paysuccess

FIX: LnURL pay animation
This commit is contained in:
GLaDOS 2022-04-13 13:58:53 +01:00 committed by GitHub
commit 535f352b08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 66 additions and 72 deletions

View File

@ -1,6 +1,6 @@
PODS:
- boost (1.76.0)
- BugsnagReactNative (7.16.2):
- BugsnagReactNative (7.16.3):
- React-Core
- BVLinearGradient (2.5.6):
- React
@ -314,7 +314,7 @@ PODS:
- React-Core
- react-native-tor (0.1.8):
- React
- react-native-webview (11.17.2):
- react-native-webview (11.18.1):
- React-Core
- react-native-widget-center (0.0.7):
- React
@ -383,14 +383,14 @@ PODS:
- React-jsi (= 0.67.4)
- React-logger (= 0.67.4)
- React-perflogger (= 0.67.4)
- RealmJS (10.13.0):
- RealmJS (10.14.0):
- GCDWebServer
- React
- RemobileReactNativeQrcodeLocalImage (1.0.4):
- React
- rn-ldk (0.7.5):
- React-Core
- RNCAsyncStorage (1.17.0):
- RNCAsyncStorage (1.17.3):
- React-Core
- RNCClipboard (1.9.0):
- React-Core
@ -398,7 +398,7 @@ PODS:
- React-Core
- RNDefaultPreference (1.4.3):
- React
- RNDeviceInfo (8.5.1):
- RNDeviceInfo (8.7.0):
- React-Core
- RNFS (2.19.0):
- React-Core
@ -447,7 +447,7 @@ PODS:
- React-RCTVibration
- ReactCommon/turbomodule/core
- Yoga
- RNScreens (3.11.0):
- RNScreens (3.13.1):
- React-Core
- React-RCTImage
- RNSecureKeyStore (1.0.0):
@ -739,7 +739,7 @@ CHECKOUT OPTIONS:
SPEC CHECKSUMS:
boost: a7c83b31436843459a1961bfd74b96033dc77234
BugsnagReactNative: 8ccbb937bc8001cd3a5ed18ef0691d23cca8a748
BugsnagReactNative: c4b321959cf9c0cf7f32de9d5b990f64a7f6ac72
BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
@ -785,7 +785,7 @@ SPEC CHECKSUMS:
react-native-safe-area-context: 9e40fb181dac02619414ba1294d6c2a807056ab9
react-native-tcp-socket: 199889cd48b07a0238e0feb53549607de5207116
react-native-tor: 3b14e9160b2eb7fa3f310921b2dee71a5171e5b7
react-native-webview: 380c1a03ec94b7ed764dac8db1e7c9952d08c93a
react-native-webview: 0b7bd2bffced115aefd393e1841babd9b9a557b1
react-native-widget-center: 5e63193fce272aa3c2aa4f1a33e129b06a962f47
React-perflogger: 0afaf2f01a47fd0fc368a93bfbb5bd3b26db6e7f
React-RCTActionSheet: 59f35c4029e0b532fc42114241a06e170b7431a2
@ -799,14 +799,14 @@ SPEC CHECKSUMS:
React-RCTVibration: 3b52a7dced19cdb025b4f88ab26ceb2d85f30ba2
React-runtimeexecutor: a9d3c82ddf7ffdad9fbe6a81c6d6f8c06385464d
ReactCommon: 07d0c460b9ba9af3eaf1b8f5abe7daaad28c9c4e
RealmJS: 9ca55cce37eedc14f6f3db233ba3d3ad52838c6f
RealmJS: 5a939376f3bdd94708abe2326d33d8f935b9fb37
RemobileReactNativeQrcodeLocalImage: 57aadc12896b148fb5e04bc7c6805f3565f5c3fa
rn-ldk: cd7e176c2cc131402cbeaa603f0e9991cd27a896
RNCAsyncStorage: 4efdcd2f7378421b29467c9de58f43552b60cf5b
RNCAsyncStorage: 005c0e2f09575360f142d0d1f1f15e4ec575b1af
RNCClipboard: 99fc8ad669a376b756fbc8098ae2fd05c0ed0668
RNCPushNotificationIOS: 87b8d16d3ede4532745e05b03c42cff33a36cc45
RNDefaultPreference: 2f8d6d54230edbd78708ada8d63bb275e5a8415b
RNDeviceInfo: 8d4177859b062334835962799460528869a487fb
RNDeviceInfo: 36286df381fcaf1933ff9d2d3c34ba2abeb2d8d8
RNFS: fc610f78fdf8bfc89a9e5cc2f898519f4dba1002
RNGestureHandler: 6e757e487a4834e7280e98e9bac66d2d9c575e9c
RNHandoff: d3b0754cca3a6bcd9b25f544f733f7f033ccf5fa
@ -817,7 +817,7 @@ SPEC CHECKSUMS:
RNRate: 94f57c773e155ca0d0aeeba9c10a32bce9030daf
RNReactNativeHapticFeedback: 4085973f5a38b40d3c6793a3ee5724773eae045e
RNReanimated: e28dfaa950064b674fde0a9b736e62b9dff500a7
RNScreens: fd535547baa4ef8aeaee1a8b1e3ffd17b8df44a4
RNScreens: 40a2cb40a02a609938137a1e0acfbf8fc9eebf19
RNSecureKeyStore: f1ad870e53806453039f650720d2845c678d89c8
RNShare: f116bbb04f310c665ca483d0bd1e88cf59b3b334
RNSVG: 302bfc9905bd8122f08966dc2ce2d07b7b52b9f8

74
package-lock.json generated
View File

@ -11,7 +11,7 @@
"license": "MIT",
"dependencies": {
"@babel/preset-env": "7.16.11",
"@bugsnag/react-native": "7.16.2",
"@bugsnag/react-native": "7.16.3",
"@bugsnag/source-maps": "2.3.1",
"@keystonehq/bc-ur-registry": "0.4.4",
"@ngraveio/bc-ur": "1.1.6",
@ -49,13 +49,13 @@
"junderw-crc32c": "1.2.0",
"lottie-ios": "3.2.3",
"lottie-react-native": "5.0.1",
"metro-react-native-babel-preset": "0.70.0",
"metro-react-native-babel-preset": "0.70.1",
"path-browserify": "1.0.1",
"payjoin-client": "1.0.1",
"process": "0.11.10",
"prop-types": "15.8.1",
"react": "17.0.2",
"react-localization": "1.0.18",
"react-localization": "1.0.19",
"react-native": "0.67.4",
"react-native-blue-crypto": "https://github.com/BlueWallet/react-native-blue-crypto#fbc2e6beded0b7f61e0986ce98cca1230f84bc1c",
"react-native-camera": "4.2.1",
@ -89,7 +89,7 @@
"react-native-rate": "1.2.9",
"react-native-reanimated": "2.2.4",
"react-native-safe-area-context": "3.4.1",
"react-native-screens": "3.11.0",
"react-native-screens": "3.13.1",
"react-native-secure-key-store": "https://github.com/BlueWallet/react-native-secure-key-store#63ab38c9d382a819844a086a69cc204c46aa93f9",
"react-native-share": "7.3.7",
"react-native-svg": "12.3.0",
@ -97,7 +97,7 @@
"react-native-tor": "0.1.8",
"react-native-vector-icons": "9.1.0",
"react-native-watch-connectivity": "1.0.4",
"react-native-webview": "11.17.2",
"react-native-webview": "11.18.1",
"react-native-widget-center": "https://github.com/BlueWallet/react-native-widget-center#b1382bbe1ed631b50a8aa03390f64c50775bc9ff",
"react-native-windows": "0.67.6",
"react-test-render": "1.1.2",
@ -2033,9 +2033,9 @@
}
},
"node_modules/@bugsnag/react-native": {
"version": "7.16.2",
"resolved": "https://registry.npmjs.org/@bugsnag/react-native/-/react-native-7.16.2.tgz",
"integrity": "sha512-pnEIq58TUg7b85cJGWwzm43md/N01pESak6PSx9UrSzLjf+KRyIjWr932KOsCZaE11TLQFFUXz4kKNcMKqnzDg==",
"version": "7.16.3",
"resolved": "https://registry.npmjs.org/@bugsnag/react-native/-/react-native-7.16.3.tgz",
"integrity": "sha512-qQgOO4hYu4S1bFQsb3Uc8Zd+xYOzyPDBpQGxj2lhCLoEgMPJAsb91QgBId4m9PlYNv3fBfK+BWvbF577E11TQg==",
"dependencies": {
"@bugsnag/core": "^7.16.1",
"@bugsnag/delivery-react-native": "^7.16.1",
@ -20633,9 +20633,9 @@
}
},
"node_modules/metro-react-native-babel-preset": {
"version": "0.70.0",
"resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.70.0.tgz",
"integrity": "sha512-MoOK5/rdDE2bABA+KpbXV6w0Q96sZeZiE9Ct89NYp9nPwXIaY7ylulLsjW3+rT6BdecKuNPUVwvtO0vYIQwvRw==",
"version": "0.70.1",
"resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.70.1.tgz",
"integrity": "sha512-E7jCbHyb+HTA00AqO/XxURCNFc68KU9nJo7zMDGt4EjwcUP80RaBzK1O4/GborQzkWM4wjIuQMnYX6xWYuV5ag==",
"dependencies": {
"@babel/core": "^7.14.0",
"@babel/plugin-proposal-async-generator-functions": "^7.0.0",
@ -20661,6 +20661,7 @@
"@babel/plugin-transform-function-name": "^7.0.0",
"@babel/plugin-transform-literals": "^7.0.0",
"@babel/plugin-transform-modules-commonjs": "^7.0.0",
"@babel/plugin-transform-named-capturing-groups-regex": "^7.0.0",
"@babel/plugin-transform-parameters": "^7.0.0",
"@babel/plugin-transform-react-display-name": "^7.0.0",
"@babel/plugin-transform-react-jsx": "^7.0.0",
@ -23460,14 +23461,14 @@
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
},
"node_modules/react-localization": {
"version": "1.0.18",
"resolved": "https://registry.npmjs.org/react-localization/-/react-localization-1.0.18.tgz",
"integrity": "sha512-LL6+aKR7E72Ek23LnKrVd3cd2fojJfQtPzveic98YPHdgcYhz+zMaWlQJgKAeZzi0jH9Euls+S+/YZFvY0Wz2Q==",
"version": "1.0.19",
"resolved": "https://registry.npmjs.org/react-localization/-/react-localization-1.0.19.tgz",
"integrity": "sha512-f4E6T8xRis19K8qMOnnhjGV2quy1YH2lrSsnAiytvgt7uOSp6WgDhrZH6XZEaEFqupTOCFSf8uagIoIAkjl4JA==",
"dependencies": {
"localized-strings": "^0.2.0"
},
"peerDependencies": {
"react": "^17.0.0 || ^16.0.0 || ^15.6.0"
"react": "^18.0.0 || ^17.0.0 || ^16.0.0 || ^15.6.0"
}
},
"node_modules/react-native": {
@ -23951,9 +23952,9 @@
"integrity": "sha1-Dm2o8M5Sg471zsXI+TlrDBtko8s="
},
"node_modules/react-native-screens": {
"version": "3.11.0",
"resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.11.0.tgz",
"integrity": "sha512-4ml42gzxqcjIoPr0zNeN9AHNRK06v2VrF5McT+QpU1GXipehycJ1BBWfziMEsMKZiUeVy4TU7qFlHUuys2mlzw==",
"version": "3.13.1",
"resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.13.1.tgz",
"integrity": "sha512-xcrnuUs0qUrGpc2gOTDY4VgHHADQwp80mwR1prU/Q0JqbZN5W3koLhuOsT6FkSRKjR5t40l+4LcjhHdpqRB2HA==",
"dependencies": {
"react-freeze": "^1.0.0",
"warn-once": "^0.1.0"
@ -24078,9 +24079,9 @@
}
},
"node_modules/react-native-webview": {
"version": "11.17.2",
"resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-11.17.2.tgz",
"integrity": "sha512-7Sac02xq11qFACJmSUuCnH0aUFtSWUvSRC09EZ2qwNXq4IvT05xlX6978nlKUXf2ljw/0qZIzqbKzuXnu6Wq8Q==",
"version": "11.18.1",
"resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-11.18.1.tgz",
"integrity": "sha512-1VoVmkbsHJ44WA+frMhNfua64t0u2jq80h25sUWrKJRiYrO0XIsKBnJcqrzuOH1ZAT/zDHTqBB5OU+bxEHLJmQ==",
"dependencies": {
"escape-string-regexp": "2.0.0",
"invariant": "2.2.4"
@ -29788,9 +29789,9 @@
"requires": {}
},
"@bugsnag/react-native": {
"version": "7.16.2",
"resolved": "https://registry.npmjs.org/@bugsnag/react-native/-/react-native-7.16.2.tgz",
"integrity": "sha512-pnEIq58TUg7b85cJGWwzm43md/N01pESak6PSx9UrSzLjf+KRyIjWr932KOsCZaE11TLQFFUXz4kKNcMKqnzDg==",
"version": "7.16.3",
"resolved": "https://registry.npmjs.org/@bugsnag/react-native/-/react-native-7.16.3.tgz",
"integrity": "sha512-qQgOO4hYu4S1bFQsb3Uc8Zd+xYOzyPDBpQGxj2lhCLoEgMPJAsb91QgBId4m9PlYNv3fBfK+BWvbF577E11TQg==",
"requires": {
"@bugsnag/core": "^7.16.1",
"@bugsnag/delivery-react-native": "^7.16.1",
@ -44698,9 +44699,9 @@
}
},
"metro-react-native-babel-preset": {
"version": "0.70.0",
"resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.70.0.tgz",
"integrity": "sha512-MoOK5/rdDE2bABA+KpbXV6w0Q96sZeZiE9Ct89NYp9nPwXIaY7ylulLsjW3+rT6BdecKuNPUVwvtO0vYIQwvRw==",
"version": "0.70.1",
"resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.70.1.tgz",
"integrity": "sha512-E7jCbHyb+HTA00AqO/XxURCNFc68KU9nJo7zMDGt4EjwcUP80RaBzK1O4/GborQzkWM4wjIuQMnYX6xWYuV5ag==",
"requires": {
"@babel/core": "^7.14.0",
"@babel/plugin-proposal-async-generator-functions": "^7.0.0",
@ -44726,6 +44727,7 @@
"@babel/plugin-transform-function-name": "^7.0.0",
"@babel/plugin-transform-literals": "^7.0.0",
"@babel/plugin-transform-modules-commonjs": "^7.0.0",
"@babel/plugin-transform-named-capturing-groups-regex": "^7.0.0",
"@babel/plugin-transform-parameters": "^7.0.0",
"@babel/plugin-transform-react-display-name": "^7.0.0",
"@babel/plugin-transform-react-jsx": "^7.0.0",
@ -46590,9 +46592,9 @@
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
},
"react-localization": {
"version": "1.0.18",
"resolved": "https://registry.npmjs.org/react-localization/-/react-localization-1.0.18.tgz",
"integrity": "sha512-LL6+aKR7E72Ek23LnKrVd3cd2fojJfQtPzveic98YPHdgcYhz+zMaWlQJgKAeZzi0jH9Euls+S+/YZFvY0Wz2Q==",
"version": "1.0.19",
"resolved": "https://registry.npmjs.org/react-localization/-/react-localization-1.0.19.tgz",
"integrity": "sha512-f4E6T8xRis19K8qMOnnhjGV2quy1YH2lrSsnAiytvgt7uOSp6WgDhrZH6XZEaEFqupTOCFSf8uagIoIAkjl4JA==",
"requires": {
"localized-strings": "^0.2.0"
}
@ -46974,9 +46976,9 @@
}
},
"react-native-screens": {
"version": "3.11.0",
"resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.11.0.tgz",
"integrity": "sha512-4ml42gzxqcjIoPr0zNeN9AHNRK06v2VrF5McT+QpU1GXipehycJ1BBWfziMEsMKZiUeVy4TU7qFlHUuys2mlzw==",
"version": "3.13.1",
"resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.13.1.tgz",
"integrity": "sha512-xcrnuUs0qUrGpc2gOTDY4VgHHADQwp80mwR1prU/Q0JqbZN5W3koLhuOsT6FkSRKjR5t40l+4LcjhHdpqRB2HA==",
"requires": {
"react-freeze": "^1.0.0",
"warn-once": "^0.1.0"
@ -47061,9 +47063,9 @@
}
},
"react-native-webview": {
"version": "11.17.2",
"resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-11.17.2.tgz",
"integrity": "sha512-7Sac02xq11qFACJmSUuCnH0aUFtSWUvSRC09EZ2qwNXq4IvT05xlX6978nlKUXf2ljw/0qZIzqbKzuXnu6Wq8Q==",
"version": "11.18.1",
"resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-11.18.1.tgz",
"integrity": "sha512-1VoVmkbsHJ44WA+frMhNfua64t0u2jq80h25sUWrKJRiYrO0XIsKBnJcqrzuOH1ZAT/zDHTqBB5OU+bxEHLJmQ==",
"requires": {
"escape-string-regexp": "2.0.0",
"invariant": "2.2.4"

View File

@ -143,6 +143,7 @@ const LnurlPay = () => {
fromWalletID: walletID,
},
});
setIsLoading(false);
} catch (Err) {
console.log(Err.message);
setIsLoading(false);

View File

@ -2,9 +2,17 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { View, Text, Linking, StyleSheet, Image, ScrollView } from 'react-native';
import AsyncStorage from '@react-native-async-storage/async-storage';
import { Icon } from 'react-native-elements';
import { BlueButton, BlueButtonLink, BlueCard, BlueLoading, BlueSpacing20, BlueText, SafeBlueArea } from '../../BlueComponents';
import {
BlueButton,
BlueButtonLink,
BlueCard,
BlueLoading,
BlueSpacing20,
BlueSpacing40,
BlueText,
SafeBlueArea,
} from '../../BlueComponents';
import navigationStyle from '../../components/navigationStyle';
import Lnurl from '../../class/lnurl';
import loc from '../../loc';
@ -75,17 +83,11 @@ export default class LnurlPaySuccess extends Component {
return (
<SafeBlueArea style={styles.root}>
<ScrollView>
{justPaid ? (
<View style={styles.iconContainer}>
<SuccessView />
</View>
) : (
<View style={styles.iconContainer}>
<Icon name="check" size={50} type="font-awesome" color="#0f5cc0" />
</View>
)}
{justPaid && <SuccessView />}
<BlueSpacing20 />
<BlueSpacing40 />
<BlueSpacing40 />
<BlueText style={styles.alignSelfCenter}>{domain}</BlueText>
<BlueText style={styles.alignSelfCenter}>{description}</BlueText>
{image && <Image style={styles.img} source={{ uri: image }} />}
@ -165,18 +167,6 @@ const styles = StyleSheet.create({
root: {
padding: 0,
},
iconContainer: {
backgroundColor: '#ccddf9',
width: 120,
height: 120,
maxWidth: 120,
maxHeight: 120,
padding: 0,
borderRadius: 60,
alignSelf: 'center',
justifyContent: 'center',
alignItems: 'center',
},
successContainer: {
marginTop: 10,
},
@ -193,5 +183,6 @@ LnurlPaySuccess.navigationOptions = navigationStyle({
title: '',
closeButton: true,
headerHideBackButton: true,
gestureEnabled: false,
closeButtonFunc: ({ navigation }) => navigation.dangerouslyGetParent().popToTop(),
});