From d663512ab552b98fe0fd2df51993aae908548cee Mon Sep 17 00:00:00 2001 From: sairaj mote Date: Wed, 8 Nov 2023 15:45:39 +0530 Subject: [PATCH] Added script-path routing --- index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 8e565f5..c75dd7a 100644 --- a/index.html +++ b/index.html @@ -1338,8 +1338,8 @@ const [suggestedFeeStatus, setSuggestedFeeStatus] = $signal(['idle']) const [feeType, setFeeType] = $signal('suggested') const [atTaprootStep, setAtTaprootStep] = $signal(1); - const [spendingType, setSpendingType] = $signal('key-path'); router.addRoute('send', (state) => { + let { params: { type = 'key-path' } } = state const [isSignRequired, setIsSignRequired] = $signal(false) const renderSendPage = () => { let feeSection = '' @@ -1363,7 +1363,7 @@ ` } let form = ''; - if (spendingType() === 'script-path') { + if (type === 'script-path') { switch (atTaprootStep()) { case 1: form = html` @@ -1511,12 +1511,12 @@

Perform Transaction

- setSpendingType(e.target.value)}> - Key-path - Script-path + location.hash = `/send?type=${e.target.value}`}> + Key-path + Script-path - ${spendingType() === 'script-path' ? html` + ${type === 'script-path' ? html`