Merge pull request #2488 from BlueWallet/fix-2390

FIX: Scanning a Vault PSBT Qr code when scanning for a send address h…
This commit is contained in:
GLaDOS 2021-01-11 18:32:47 +00:00 committed by GitHub
commit e7f4fbc30b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -282,6 +282,13 @@ export default class SendDetails extends Component {
processAddressData = data => {
this.setState({ isLoading: true }, async () => {
const recipients = this.state.addresses;
if (!data.replace) {
// user probably scanned PSBT and got an object instead of string..?
this.setState({
isLoading: false,
});
return alert(loc.send.details_address_field_is_not_valid);
}
const dataWithoutSchema = data.replace('bitcoin:', '').replace('BITCOIN:', '');
if (this.state.fromWallet.isAddressValid(dataWithoutSchema)) {
recipients[[this.state.recipientsScrollIndex]].address = dataWithoutSchema;