From 5237022f5c4632c342872299490bb833b8d94505 Mon Sep 17 00:00:00 2001 From: vpcodebase <84332922+vpcodebase@users.noreply.github.com> Date: Mon, 5 Jul 2021 12:25:16 +0300 Subject: [PATCH 1/3] Tx page issue (#7) * fix: search bar fix if number input, add badge (#2) * fix: search bar fix if number input, add badge for type in search bar, horfix for direct link in inventory page * fix: theme mode blink page * fix: write boolean in tx page * fix: styles for contract tab in address page * fix: remove btn * fix: env, results per page go to first page in grid. fix path for REACT_APP_EXPLORER_V1_API_URL * Update .env.example * fix: improve * fix: stable .env Co-authored-by: potvik <57394565+potvik@users.noreply.github.com> --- .env.example | 2 +- src/web3/parseByteCode.tsx | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.env.example b/.env.example index 5002bc8..dfb3fd0 100644 --- a/.env.example +++ b/.env.example @@ -3,7 +3,7 @@ REACT_APP_RPC_URL_SHARD1=https://api.s1.t.hmny.io/ REACT_APP_RPC_URL_SHARD2=https://api.s2.t.hmny.io/ REACT_APP_RPC_URL_SHARD3=https://api.s3.t.hmny.io/ REACT_APP_AVAILABLE_SHARDS=0,1,2,3 -REACT_APP_EXPLORER_V1_API_URL=https://explorer.pops.one:8888 +REACT_APP_EXPLORER_V1_API_URL=https://explorer.pops.one:8888/ REACT_APP_INDEXER_IPFS_GATEWAY=https://ipfs.io/ipfs/ REACT_APP_PROD_ADDRESS=https://explorer-v2-api.hmny.io/ REACT_APP_DEV_ADDRESS=https://ws.explorer-v2.hmny.io/ diff --git a/src/web3/parseByteCode.tsx b/src/web3/parseByteCode.tsx index ca7f6a2..9729b88 100644 --- a/src/web3/parseByteCode.tsx +++ b/src/web3/parseByteCode.tsx @@ -148,14 +148,16 @@ export const DisplaySignature = (props: any = {}) => { parsed[input.name].map((a: any, i: number) => { return ( <> -
+ {i < parsed[input.name].length - 1 && ", "} > ); }) - ) : ( - - ) + ) : parsed[input?.name?.toString()] ? ( + + ) : null ) : Array.isArray(parsed[input.name]) ? ( parsed[input.name].join(", ") ) : ( From 3760d40bb5635fff1ce624e6b7226f151399b162 Mon Sep 17 00:00:00 2001 From: vpcodebase <84332922+vpcodebase@users.noreply.github.com> Date: Mon, 5 Jul 2021 12:41:13 +0300 Subject: [PATCH 2/3] tx improvements (#9) * fix: search bar fix if number input, add badge (#2) * fix: search bar fix if number input, add badge for type in search bar, horfix for direct link in inventory page * fix: theme mode blink page * fix: write boolean in tx page * fix: styles for contract tab in address page * fix: remove btn * fix: env, results per page go to first page in grid. fix path for REACT_APP_EXPLORER_V1_API_URL * Update .env.example * fix: improve * fix: stable .env * fix: improve tx Co-authored-by: potvik <57394565+potvik@users.noreply.github.com> --- src/web3/parseByteCode.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/web3/parseByteCode.tsx b/src/web3/parseByteCode.tsx index 9729b88..5a8a7c6 100644 --- a/src/web3/parseByteCode.tsx +++ b/src/web3/parseByteCode.tsx @@ -160,9 +160,9 @@ export const DisplaySignature = (props: any = {}) => { ) : null ) : Array.isArray(parsed[input.name]) ? ( parsed[input.name].join(", ") - ) : ( - parsed[input.name].toString() - )} + ) : parsed[input.name] ? ( + parsed[input.name]?.toString() + ) : null} {i < abi.inputs.length - 1 ? ", " : null} ); From 48840928efc717b13ffd5d827cc801bca310ec9f Mon Sep 17 00:00:00 2001 From: vpcodebase <84332922+vpcodebase@users.noreply.github.com> Date: Tue, 6 Jul 2021 08:05:25 +0300 Subject: [PATCH 3/3] grid update with rowDetails fix (#10) * fix: search bar fix if number input, add badge (#2) * fix: search bar fix if number input, add badge for type in search bar, horfix for direct link in inventory page * fix: theme mode blink page * fix: write boolean in tx page * fix: styles for contract tab in address page * fix: remove btn * fix: env, results per page go to first page in grid. fix path for REACT_APP_EXPLORER_V1_API_URL * Update .env.example * fix: improve * fix: stable .env * fix: improve tx * fix: no update grid if tab not changed Co-authored-by: potvik <57394565+potvik@users.noreply.github.com> --- .env | 14 +++++++------- src/pages/TransactionPage/index.tsx | 13 +++++++------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.env b/.env index bcc643b..dfb3fd0 100644 --- a/.env +++ b/.env @@ -1,9 +1,9 @@ -REACT_APP_RPC_URL_SHARD0=http://internal.s0.t.hmny.io -REACT_APP_RPC_URL_SHARD1=https://api.s1.t.hmny.io -REACT_APP_RPC_URL_SHARD2=https://api.s2.t.hmny.io -REACT_APP_RPC_URL_SHARD3=https://api.s3.t.hmny.io +REACT_APP_RPC_URL_SHARD0=https://a.api.s0.t.hmny.io/ +REACT_APP_RPC_URL_SHARD1=https://api.s1.t.hmny.io/ +REACT_APP_RPC_URL_SHARD2=https://api.s2.t.hmny.io/ +REACT_APP_RPC_URL_SHARD3=https://api.s3.t.hmny.io/ REACT_APP_AVAILABLE_SHARDS=0,1,2,3 -REACT_APP_EXPLORER_V1_API_URL=https://explorer.pops.one:8888 +REACT_APP_EXPLORER_V1_API_URL=https://explorer.pops.one:8888/ REACT_APP_INDEXER_IPFS_GATEWAY=https://ipfs.io/ipfs/ -REACT_APP_PROD_ADDRESS=https://explorer-v2-api.hmny.io -#REACT_APP_DEV_ADDRESS=https://ws.explorer-v2.hmny.io +REACT_APP_PROD_ADDRESS=https://explorer-v2-api.hmny.io/ +REACT_APP_DEV_ADDRESS=https://ws.explorer-v2.hmny.io/ diff --git a/src/pages/TransactionPage/index.tsx b/src/pages/TransactionPage/index.tsx index 31f2ddf..6d0ba68 100644 --- a/src/pages/TransactionPage/index.tsx +++ b/src/pages/TransactionPage/index.tsx @@ -38,7 +38,7 @@ export const TransactionPage = () => { } catch { activeTab = 0; } - + // hash or number // @ts-ignore const { id } = useParams(); @@ -168,11 +168,12 @@ export const TransactionPage = () => { justify="start" activeIndex={activeIndex} onActive={(newActive) => { - history.replace( - `${history.location.pathname}?activeTab=${newActive}` - ); - console.log(history); - setActiveIndex(newActive); + if (newActive !== activeIndex) { + history.replace( + `${history.location.pathname}?activeTab=${newActive}` + ); + setActiveIndex(newActive); + } }} >