mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-23 15:20:55 +01:00
fix: ensure bech32 addresses use uppercase as per BIP 0173
- Adjusted QR code generation to use uppercase for bech32 addresses, aligning with BIP 0173 specifications for optimal QR encoding efficiency.
This commit is contained in:
parent
421b30a130
commit
fdfb55d3e2
1 changed files with 6 additions and 0 deletions
|
@ -413,6 +413,12 @@ class DeeplinkSchemaMatch {
|
|||
}
|
||||
|
||||
static bip21encode(address: string, options: TOptions): string {
|
||||
//uppercase address if bech32 to satisfy BIP_0173
|
||||
const isBech32 = address.startsWith('bc1');
|
||||
if (isBech32) {
|
||||
address = address.toUpperCase();
|
||||
}
|
||||
|
||||
for (const key in options) {
|
||||
if (key === 'label' && String(options[key]).replace(' ', '').length === 0) {
|
||||
delete options[key];
|
||||
|
|
Loading…
Add table
Reference in a new issue