diff --git a/ui/component/txoList/view.jsx b/ui/component/txoList/view.jsx index 22fd570b0..474b152f6 100644 --- a/ui/component/txoList/view.jsx +++ b/ui/component/txoList/view.jsx @@ -30,6 +30,7 @@ type Props = { type Delta = { dkey: string, value: string, + tab: string }; function TxoList(props: Props) { @@ -51,6 +52,7 @@ function TxoList(props: Props) { const type = urlParams.get(TXO.TYPE) || TXO.ALL; const subtype = urlParams.get(TXO.SUB_TYPE); const active = urlParams.get(TXO.ACTIVE) || TXO.ALL; + const currency = urlParams.get('currency') || 'credits'; const currentUrlParams = { page, @@ -58,6 +60,7 @@ function TxoList(props: Props) { active, type, subtype, + currency }; const hideStatus = @@ -119,8 +122,17 @@ function TxoList(props: Props) { history.push(url); } + // let currency = 'credits'; function updateUrl(delta: Delta) { const newUrlParams = new URLSearchParams(); + // if (delta.currency) { + // currency = delta.currency; + // } + + // set tab name to account for wallet page tab + newUrlParams.set('tab', delta.tab); + newUrlParams.set('currency', delta.currency); + switch (delta.dkey) { case TXO.PAGE: if (currentUrlParams.type) { @@ -179,6 +191,10 @@ function TxoList(props: Props) { const paramsString = JSON.stringify(params); + // tab used in the wallet section + // TODO: change the name of this eventually + const tab = 'fiat-payment-history'; + useEffect(() => { if (paramsString && updateTxoPageParams) { const params = JSON.parse(paramsString); @@ -195,17 +211,17 @@ function TxoList(props: Props) {