mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 06:52:41 +01:00
FIX: removed unused additionalProperties argument
This commit is contained in:
parent
872fde5227
commit
43f2117ad0
3 changed files with 8 additions and 21 deletions
|
@ -35,11 +35,10 @@ function WalletImport() {
|
|||
/**
|
||||
*
|
||||
* @param w {AbstractWallet}
|
||||
* @param additionalProperties key-values passed from outside. Used only to set up `masterFingerprint` property for watch-only wallet
|
||||
* @returns {Promise<void>}
|
||||
* @private
|
||||
*/
|
||||
WalletImport._saveWallet = async (w, additionalProperties) => {
|
||||
WalletImport._saveWallet = async w => {
|
||||
IdleTimerManager.setIdleTimerDisabled(false);
|
||||
if (WalletImport.isWalletImported(w)) {
|
||||
WalletImport.presentWalletAlreadyExistsAlert();
|
||||
|
@ -49,11 +48,6 @@ function WalletImport() {
|
|||
ReactNativeHapticFeedback.trigger('notificationSuccess', { ignoreAndroidSystemSettings: false });
|
||||
if (w.getLabel() === emptyWalletLabel) w.setLabel(loc.wallets.import_imported + ' ' + w.typeReadable);
|
||||
w.setUserHasSavedExport(true);
|
||||
if (additionalProperties) {
|
||||
for (const [key, value] of Object.entries(additionalProperties)) {
|
||||
w[key] = value;
|
||||
}
|
||||
}
|
||||
addWallet(w);
|
||||
await saveToDisk();
|
||||
A(A.ENUM.CREATED_WALLET);
|
||||
|
@ -92,10 +86,9 @@ function WalletImport() {
|
|||
/**
|
||||
*
|
||||
* @param importText
|
||||
* @param additionalProperties key-values passed from outside. Used only to set up `masterFingerprint` property for watch-only wallet
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
WalletImport.processImportText = async (importText, additionalProperties) => {
|
||||
WalletImport.processImportText = async importText => {
|
||||
IdleTimerManager.setIdleTimerDisabled(true);
|
||||
// Plan:
|
||||
// -2. check if BIP38 encrypted
|
||||
|
@ -232,7 +225,7 @@ function WalletImport() {
|
|||
watchOnly.setSecret(importText);
|
||||
if (watchOnly.valid()) {
|
||||
await watchOnly.fetchBalance();
|
||||
return WalletImport._saveWallet(watchOnly, additionalProperties);
|
||||
return WalletImport._saveWallet(watchOnly);
|
||||
}
|
||||
// nope, not watch-only
|
||||
|
||||
|
|
|
@ -229,11 +229,7 @@ const ScanQRCode = () => {
|
|||
if (launchedBy) {
|
||||
navigation.navigate(launchedBy);
|
||||
}
|
||||
if (ret.additionalProperties) {
|
||||
onBarScanned(ret.data, ret.additionalProperties);
|
||||
} else {
|
||||
onBarScanned(ret.data);
|
||||
}
|
||||
onBarScanned(ret.data);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
|
|
|
@ -65,9 +65,8 @@ const WalletsImport = () => {
|
|||
/**
|
||||
*
|
||||
* @param importText
|
||||
* @param additionalProperties key-values passed from outside. Used only to set up `masterFingerprint` property for watch-only wallet
|
||||
*/
|
||||
const importMnemonic = async (importText, additionalProperties) => {
|
||||
const importMnemonic = async importText => {
|
||||
if (WalletImport.isCurrentlyImportingWallet()) {
|
||||
return;
|
||||
}
|
||||
|
@ -75,7 +74,7 @@ const WalletsImport = () => {
|
|||
navigation.dangerouslyGetParent().pop();
|
||||
await new Promise(resolve => setTimeout(resolve, 500)); // giving some time to animations
|
||||
try {
|
||||
await WalletImport.processImportText(importText, additionalProperties);
|
||||
await WalletImport.processImportText(importText);
|
||||
WalletImport.removePlaceholderWallet();
|
||||
} catch (error) {
|
||||
WalletImport.removePlaceholderWallet();
|
||||
|
@ -89,12 +88,11 @@ const WalletsImport = () => {
|
|||
/**
|
||||
*
|
||||
* @param value
|
||||
* @param additionalProperties key-values passed from outside. Used only to set up `masterFingerprint` property for watch-only wallet
|
||||
*/
|
||||
const onBarScanned = (value, additionalProperties) => {
|
||||
const onBarScanned = value => {
|
||||
if (value && value.data) value = value.data + ''; // no objects here, only strings
|
||||
setImportText(value);
|
||||
setTimeout(() => importMnemonic(value, additionalProperties), 500);
|
||||
setTimeout(() => importMnemonic(value), 500);
|
||||
};
|
||||
|
||||
const importScan = () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue