Skip to content

Commit 6f252e5

Browse files
committed
Use the liquidnetwork: protocol for liquid QRs
See: ElementsProject/elements#805 (comment) Resolves #232
1 parent 0af3aca commit 6f252e5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

client/src/util.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { nativeAssetId } from './const'
88
const BLIND_PREFIX = +process.env.BLIND_PREFIX || 0x0c
99
, reHash256 = /^[a-f0-9]{64}$/i
1010
, reBech32 = /^[a-z]{1,83}1[ac-hj-np-z02-9]{6,100}$/
11+
, qrPrefix = process.env.IS_ELEMENTS ? 'liquidnetwork' : 'bitcoin'
1112

1213
// not null or undefined
1314
export const notNully = x => x != null
@@ -87,7 +88,7 @@ export const processGoAddr =
8788
}
8889

8990
export const makeAddressQR = addr => {
90-
let qrstr = `bitcoin:${addr}`
91+
let qrstr = `${qrPrefix}:${addr}`
9192
return qrcode.toDataURL(
9293
// upper-case bech32 addresses to enable the compact qr encoding mode
9394
reBech32.test(addr) ? qrstr.toUpperCase() : qrstr

0 commit comments

Comments
 (0)