mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-24 15:36:59 +01:00
Merge pull request #2692 from BlueWallet/fix-2684
FIX: broken buyBitcoin button for some wallets (closes #2684)
This commit is contained in:
commit
4921598891
2 changed files with 2 additions and 1 deletions
|
@ -45,7 +45,7 @@ export default class BuyBitcoin extends Component {
|
|||
} else {
|
||||
// otherwise, lets call widely-used getAddressAsync()
|
||||
try {
|
||||
address = await Promise.race([wallet.getAddressAsync(), this.context.sleep(2000)]);
|
||||
address = await Promise.race([wallet.getAddressAsync(), new Promise(resolve => setTimeout(resolve, 2000))]);
|
||||
} catch (_) {}
|
||||
|
||||
if (!address) {
|
||||
|
|
|
@ -9,6 +9,7 @@ describe('Segwit P2SH wallet', () => {
|
|||
assert.strictEqual(wallet.getAddress(), '3CKN8HTCews4rYJYsyub5hjAVm5g5VFdQJ');
|
||||
assert.deepStrictEqual(wallet.getAllExternalAddresses(), ['3CKN8HTCews4rYJYsyub5hjAVm5g5VFdQJ']);
|
||||
assert.strictEqual(await wallet.getChangeAddressAsync(), wallet.getAddress());
|
||||
assert.strictEqual(await wallet.getAddressAsync(), wallet.getAddress());
|
||||
|
||||
const utxos = [
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue