Skip to content

Commit

Permalink
Allow bech32 address on flyover pegout recipient option
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldsg20 committed Dec 5, 2024
1 parent 6be87f3 commit 777d567
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
12 changes: 3 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/pegout/components/PegoutForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ export default defineComponent({
const { bridgeContractAddress } = pegOutTxState.value.pegoutConfiguration;
const { valid, addressType } = validateAddress(btcRecipientAddress);
const allowedAdressType = (addressType === constants.BITCOIN_LEGACY_ADDRESS
|| addressType === constants.BITCOIN_SEGWIT_ADDRESS);
|| addressType === constants.BITCOIN_SEGWIT_ADDRESS
|| addressType === constants.BITCOIN_NATIVE_SEGWIT_ADDRESS);
const amountPlusFees = selectedQuote.value.quote.value
.plus(selectedQuote.value.quote.gasFee)
.plus(selectedQuote.value.quote.productFeeAmount)
Expand Down
5 changes: 3 additions & 2 deletions src/pegout/components/PegoutOption.vue
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,13 @@ export default defineComponent({
return '';
});
const btcAddressPlaceholder = `Paste your (Legacy or Segwit) ${environmentContext.getBtcTicker()} address`;
const btcAddressPlaceholder = `Paste your (Legacy, Segwit or Bech32) ${environmentContext.getBtcTicker()} address`;
const isValidBtcAddress = computed(() => {
const { valid, addressType } = validateAddress(btcAddress.value);
return valid && (addressType === constants.BITCOIN_LEGACY_ADDRESS
|| addressType === constants.BITCOIN_SEGWIT_ADDRESS);
|| addressType === constants.BITCOIN_SEGWIT_ADDRESS
|| addressType === constants.BITCOIN_NATIVE_SEGWIT_ADDRESS);
});
const showAddressWarning = computed(
Expand Down

0 comments on commit 777d567

Please sign in to comment.