mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-19 14:45:17 +01:00
FIX: Restored deep link.
This commit is contained in:
parent
c1b70cb537
commit
2901f80c32
@ -36,7 +36,12 @@ export class AbstractWallet {
|
||||
}
|
||||
|
||||
getPreferredBalanceUnit() {
|
||||
return this.preferredBalanceUnit || BitcoinUnit.BTC;
|
||||
for (let value of Object.values(BitcoinUnit)) {
|
||||
if (value === this.preferredBalanceUnit) {
|
||||
return this.preferredBalanceUnit;
|
||||
}
|
||||
}
|
||||
return BitcoinUnit.BTC;
|
||||
}
|
||||
|
||||
allowReceive() {
|
||||
|
@ -34,7 +34,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>164</string>
|
||||
<string>165</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
|
@ -135,8 +135,25 @@ export default class SendDetails extends Component {
|
||||
});
|
||||
|
||||
if (this.props.navigation.state.params.uri) {
|
||||
if (!BitcoinBIP70TransactionDecode.matchesPaymentURL(this.props.navigation.state.params.uri)) {
|
||||
if (BitcoinBIP70TransactionDecode.matchesPaymentURL(this.props.navigation.state.params.uri)) {
|
||||
this.processBIP70Invoice(this.props.navigation.state.params.uri);
|
||||
} else {
|
||||
try {
|
||||
let amount = '';
|
||||
let parsedBitcoinUri = null;
|
||||
let address = '';
|
||||
let memo = '';
|
||||
|
||||
parsedBitcoinUri = bip21.decode(this.props.navigation.state.params.uri);
|
||||
console.warn(parsedBitcoinUri);
|
||||
address = parsedBitcoinUri.address || address;
|
||||
amount = parsedBitcoinUri.options.amount.toString() || amount;
|
||||
memo = parsedBitcoinUri.options.label || memo;
|
||||
this.setState({ address, amount, memo });
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
alert('Error: Unable to decode Bitcoin address');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,6 @@ import { NavigationEvents } from 'react-navigation';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import PropTypes from 'prop-types';
|
||||
import { BitcoinUnit } from '../../models/bitcoinUnits';
|
||||
const BigNumber = require('bignumber.js');
|
||||
let EV = require('../../events');
|
||||
let A = require('../../analytics');
|
||||
/** @type {AppStorage} */
|
||||
|
Loading…
Reference in New Issue
Block a user