FIX: scanqr call

This commit is contained in:
Marcos Rodriguez Velez 2024-03-13 17:54:32 -04:00
parent 1432be50bc
commit 57b3e9b08d
No known key found for this signature in database
GPG key ID: 6030B2F48CCE86D7
4 changed files with 30 additions and 31 deletions

4
App.js
View file

@ -264,12 +264,10 @@ const App = () => {
buttonIndex => { buttonIndex => {
switch (buttonIndex) { switch (buttonIndex) {
case 0: // Cancel case 0: // Cancel
// Handle cancel
break; break;
case 1: // Continue case 1:
handleOpenURL({ url: clipboard }); handleOpenURL({ url: clipboard });
break; break;
// Handle other buttons if there are more than two
} }
}, },
); );

50
package-lock.json generated
View file

@ -19,9 +19,9 @@
"@react-native-async-storage/async-storage": "1.22.3", "@react-native-async-storage/async-storage": "1.22.3",
"@react-native-clipboard/clipboard": "1.13.2", "@react-native-clipboard/clipboard": "1.13.2",
"@react-native-community/push-notification-ios": "1.11.0", "@react-native-community/push-notification-ios": "1.11.0",
"@react-navigation/drawer": "6.6.12", "@react-navigation/drawer": "6.6.13",
"@react-navigation/native": "6.1.15", "@react-navigation/native": "6.1.15",
"@react-navigation/native-stack": "6.9.23", "@react-navigation/native-stack": "6.9.24",
"@remobile/react-native-qrcode-local-image": "https://github.com/BlueWallet/react-native-qrcode-local-image", "@remobile/react-native-qrcode-local-image": "https://github.com/BlueWallet/react-native-qrcode-local-image",
"@spsina/bip47": "github:BlueWallet/bip47#0a2f02c90350802f2ec93afa4e6c8843be2d687c", "@spsina/bip47": "github:BlueWallet/bip47#0a2f02c90350802f2ec93afa4e6c8843be2d687c",
"aezeed": "0.0.5", "aezeed": "0.0.5",
@ -72,7 +72,7 @@
"react-native-handoff": "https://github.com/BlueWallet/react-native-handoff#31d005f93d31099d0e564590a3bbd052b8a02b39", "react-native-handoff": "https://github.com/BlueWallet/react-native-handoff#31d005f93d31099d0e564590a3bbd052b8a02b39",
"react-native-haptic-feedback": "2.2.0", "react-native-haptic-feedback": "2.2.0",
"react-native-idle-timer": "https://github.com/BlueWallet/react-native-idle-timer#8587876d68ab5920e79619726aeca9e672beaf2b", "react-native-idle-timer": "https://github.com/BlueWallet/react-native-idle-timer#8587876d68ab5920e79619726aeca9e672beaf2b",
"react-native-image-picker": "7.1.0", "react-native-image-picker": "7.1.1",
"react-native-ios-context-menu": "github:BlueWallet/react-native-ios-context-menu#v1.15.3", "react-native-ios-context-menu": "github:BlueWallet/react-native-ios-context-menu#v1.15.3",
"react-native-keychain": "8.2.0", "react-native-keychain": "8.2.0",
"react-native-linear-gradient": "2.8.3", "react-native-linear-gradient": "2.8.3",
@ -6364,11 +6364,11 @@
} }
}, },
"node_modules/@react-navigation/drawer": { "node_modules/@react-navigation/drawer": {
"version": "6.6.12", "version": "6.6.13",
"resolved": "https://registry.npmjs.org/@react-navigation/drawer/-/drawer-6.6.12.tgz", "resolved": "https://registry.npmjs.org/@react-navigation/drawer/-/drawer-6.6.13.tgz",
"integrity": "sha512-0V2DzoOCxI2JivejrRxlRUTdlX+JDNymJEsPJLTQ4Aum8LsPC5Ewk+ToO8NQCl4ZyaZC7mANhnN5fYvMq1gtaQ==", "integrity": "sha512-fMHucgHqY+n8cOR/GgIK6sYs/L1jnaOEiDcH4lmmPJYSDwKy+Srjl32Z5v1/OG2dzgtMyKFxz2/QfMPas8PQaA==",
"dependencies": { "dependencies": {
"@react-navigation/elements": "^1.3.27", "@react-navigation/elements": "^1.3.28",
"color": "^4.2.3", "color": "^4.2.3",
"warn-once": "^0.1.0" "warn-once": "^0.1.0"
}, },
@ -6409,11 +6409,11 @@
} }
}, },
"node_modules/@react-navigation/native-stack": { "node_modules/@react-navigation/native-stack": {
"version": "6.9.23", "version": "6.9.24",
"resolved": "https://registry.npmjs.org/@react-navigation/native-stack/-/native-stack-6.9.23.tgz", "resolved": "https://registry.npmjs.org/@react-navigation/native-stack/-/native-stack-6.9.24.tgz",
"integrity": "sha512-8s/DVln/da++1IGjp+3moTKPV0c6nKmCATTflwlknqoM6/yjwy3gLrnV8Tehzib+R3dvTgkqh1bZEn0l9mFQjg==", "integrity": "sha512-+UpruwDcaELmd8cGk8XUDVKFrTMN0x+FbtwNQ7if/hJKbaMg6c43rPtjtiMFX/ycYW7J3owwJ8rcCmU4M7S4Aw==",
"dependencies": { "dependencies": {
"@react-navigation/elements": "^1.3.27", "@react-navigation/elements": "^1.3.28",
"warn-once": "^0.1.0" "warn-once": "^0.1.0"
}, },
"peerDependencies": { "peerDependencies": {
@ -19696,9 +19696,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/react-native-image-picker": { "node_modules/react-native-image-picker": {
"version": "7.1.0", "version": "7.1.1",
"resolved": "https://registry.npmjs.org/react-native-image-picker/-/react-native-image-picker-7.1.0.tgz", "resolved": "https://registry.npmjs.org/react-native-image-picker/-/react-native-image-picker-7.1.1.tgz",
"integrity": "sha512-An0hn2mwqjGAA2mbsXdHRTyoMMklGPT9stIjE2zvkegU7CdoFhowqvVHfnELJNZnfAiSQuIaeY//z0r1R0lsgw==", "integrity": "sha512-8zQS8RJkGq+jV6bzmIQ560QL2tccXUwouDWktJt7typfNu/QpuDm9pnESeLkdA5MHGTMm8YR09tcV1qtBD+0fg==",
"peerDependencies": { "peerDependencies": {
"react": "*", "react": "*",
"react-native": "*" "react-native": "*"
@ -27338,11 +27338,11 @@
} }
}, },
"@react-navigation/drawer": { "@react-navigation/drawer": {
"version": "6.6.12", "version": "6.6.13",
"resolved": "https://registry.npmjs.org/@react-navigation/drawer/-/drawer-6.6.12.tgz", "resolved": "https://registry.npmjs.org/@react-navigation/drawer/-/drawer-6.6.13.tgz",
"integrity": "sha512-0V2DzoOCxI2JivejrRxlRUTdlX+JDNymJEsPJLTQ4Aum8LsPC5Ewk+ToO8NQCl4ZyaZC7mANhnN5fYvMq1gtaQ==", "integrity": "sha512-fMHucgHqY+n8cOR/GgIK6sYs/L1jnaOEiDcH4lmmPJYSDwKy+Srjl32Z5v1/OG2dzgtMyKFxz2/QfMPas8PQaA==",
"requires": { "requires": {
"@react-navigation/elements": "^1.3.27", "@react-navigation/elements": "^1.3.28",
"color": "^4.2.3", "color": "^4.2.3",
"warn-once": "^0.1.0" "warn-once": "^0.1.0"
} }
@ -27364,11 +27364,11 @@
} }
}, },
"@react-navigation/native-stack": { "@react-navigation/native-stack": {
"version": "6.9.23", "version": "6.9.24",
"resolved": "https://registry.npmjs.org/@react-navigation/native-stack/-/native-stack-6.9.23.tgz", "resolved": "https://registry.npmjs.org/@react-navigation/native-stack/-/native-stack-6.9.24.tgz",
"integrity": "sha512-8s/DVln/da++1IGjp+3moTKPV0c6nKmCATTflwlknqoM6/yjwy3gLrnV8Tehzib+R3dvTgkqh1bZEn0l9mFQjg==", "integrity": "sha512-+UpruwDcaELmd8cGk8XUDVKFrTMN0x+FbtwNQ7if/hJKbaMg6c43rPtjtiMFX/ycYW7J3owwJ8rcCmU4M7S4Aw==",
"requires": { "requires": {
"@react-navigation/elements": "^1.3.27", "@react-navigation/elements": "^1.3.28",
"warn-once": "^0.1.0" "warn-once": "^0.1.0"
} }
}, },
@ -37481,9 +37481,9 @@
"from": "react-native-idle-timer@https://github.com/BlueWallet/react-native-idle-timer#8587876d68ab5920e79619726aeca9e672beaf2b" "from": "react-native-idle-timer@https://github.com/BlueWallet/react-native-idle-timer#8587876d68ab5920e79619726aeca9e672beaf2b"
}, },
"react-native-image-picker": { "react-native-image-picker": {
"version": "7.1.0", "version": "7.1.1",
"resolved": "https://registry.npmjs.org/react-native-image-picker/-/react-native-image-picker-7.1.0.tgz", "resolved": "https://registry.npmjs.org/react-native-image-picker/-/react-native-image-picker-7.1.1.tgz",
"integrity": "sha512-An0hn2mwqjGAA2mbsXdHRTyoMMklGPT9stIjE2zvkegU7CdoFhowqvVHfnELJNZnfAiSQuIaeY//z0r1R0lsgw==" "integrity": "sha512-8zQS8RJkGq+jV6bzmIQ560QL2tccXUwouDWktJt7typfNu/QpuDm9pnESeLkdA5MHGTMm8YR09tcV1qtBD+0fg=="
}, },
"react-native-ios-context-menu": { "react-native-ios-context-menu": {
"version": "git+ssh://git@github.com/BlueWallet/react-native-ios-context-menu.git#e5c1217cd220bfab6e6d9a7c65838545082e3f8e", "version": "git+ssh://git@github.com/BlueWallet/react-native-ios-context-menu.git#e5c1217cd220bfab6e6d9a7c65838545082e3f8e",

View file

@ -339,7 +339,7 @@ const WalletsList = () => {
}); });
break; break;
case 2: case 2:
scanQrHelper(navigate, routeName, false).then(onBarScanned); scanQrHelper(navigate, routeName, true).then(data => onBarScanned({ data }));
break; break;
case 3: case 3:
if (!isClipboardEmpty) { if (!isClipboardEmpty) {

View file

@ -55,6 +55,7 @@ const WalletTransactions = ({ navigation }) => {
} = useContext(BlueStorageContext); } = useContext(BlueStorageContext);
const [isLoading, setIsLoading] = useState(false); const [isLoading, setIsLoading] = useState(false);
const { walletID } = useRoute().params; const { walletID } = useRoute().params;
const { name } = useRoute();
const wallet = wallets.find(w => w.getID() === walletID); const wallet = wallets.find(w => w.getID() === walletID);
const [itemPriceUnit, setItemPriceUnit] = useState(wallet.getPreferredBalanceUnit()); const [itemPriceUnit, setItemPriceUnit] = useState(wallet.getPreferredBalanceUnit());
const [dataSource, setDataSource] = useState(wallet.getTransactions(15)); const [dataSource, setDataSource] = useState(wallet.getTransactions(15));
@ -423,7 +424,7 @@ const WalletTransactions = ({ navigation }) => {
cancelButtonIndex, cancelButtonIndex,
anchor: findNodeHandle(walletActionButtonsRef.current), anchor: findNodeHandle(walletActionButtonsRef.current),
}, },
buttonIndex => { async buttonIndex => {
switch (buttonIndex) { switch (buttonIndex) {
case 0: case 0:
break; break;
@ -431,7 +432,7 @@ const WalletTransactions = ({ navigation }) => {
choosePhoto(); choosePhoto();
break; break;
case 2: case 2:
scanQrHelper(navigate, onBarCodeRead); scanQrHelper(navigate, name, true).then(data => onBarCodeRead({ data }));
break; break;
case 3: case 3:
if (!isClipboardEmpty) { if (!isClipboardEmpty) {