Skip to content

Commit 671e574

Browse files
committed
Allow bech32 address on flyover pegout recipient option
1 parent 8c38ff1 commit 671e574

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

package-lock.json

Lines changed: 3 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/pegout/components/PegoutForm.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ export default defineComponent({
246246
const { bridgeContractAddress } = pegOutTxState.value.pegoutConfiguration;
247247
const { valid, addressType } = validateAddress(btcRecipientAddress);
248248
const allowedAdressType = (addressType === constants.BITCOIN_LEGACY_ADDRESS
249-
|| addressType === constants.BITCOIN_SEGWIT_ADDRESS);
249+
|| addressType === constants.BITCOIN_SEGWIT_ADDRESS
250+
|| addressType === constants.BITCOIN_NATIVE_SEGWIT_ADDRESS);
250251
const amountPlusFees = selectedQuote.value.quote.value
251252
.plus(selectedQuote.value.quote.gasFee)
252253
.plus(selectedQuote.value.quote.productFeeAmount)

src/pegout/components/PegoutOption.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,13 @@ export default defineComponent({
240240
return '';
241241
});
242242
243-
const btcAddressPlaceholder = `Paste your (Legacy or Segwit) ${environmentContext.getBtcTicker()} address`;
243+
const btcAddressPlaceholder = `Paste your (Legacy, Segwit or Bech32) ${environmentContext.getBtcTicker()} address`;
244244
245245
const isValidBtcAddress = computed(() => {
246246
const { valid, addressType } = validateAddress(btcAddress.value);
247247
return valid && (addressType === constants.BITCOIN_LEGACY_ADDRESS
248-
|| addressType === constants.BITCOIN_SEGWIT_ADDRESS);
248+
|| addressType === constants.BITCOIN_SEGWIT_ADDRESS
249+
|| addressType === constants.BITCOIN_NATIVE_SEGWIT_ADDRESS);
249250
});
250251
251252
const showAddressWarning = computed(

0 commit comments

Comments
 (0)