-
Notifications
You must be signed in to change notification settings - Fork 474
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename status labels for Arbitrum blocks and transactions
- Loading branch information
Showing
12 changed files
with
105 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
NEXT_PUBLIC_ROLLUP_TYPE=arbitrum | ||
NEXT_PUBLIC_ROLLUP_L1_BASE_URL=https://example.com | ||
NEXT_PUBLIC_ROLLUP_HOMEPAGE_SHOW_LATEST_BLOCKS=true | ||
NEXT_PUBLIC_ROLLUP_PARENT_CHAIN_NAME=DuckChain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { ARBITRUM_L2_TX_BATCH_STATUSES, type ArbitrumBatchStatus, type ArbitrumL2TxData } from 'types/api/arbitrumL2'; | ||
|
||
import config from 'configs/app'; | ||
|
||
const rollupFeature = config.features.rollup; | ||
|
||
type Args = { | ||
status: ArbitrumBatchStatus; | ||
commitment_transaction: ArbitrumL2TxData; | ||
confirmation_transaction: ArbitrumL2TxData; | ||
}; | ||
|
||
export const VERIFICATION_STEPS_MAP: Record<ArbitrumBatchStatus, string> = { | ||
'Processed on rollup': 'Processed on rollup', | ||
'Sent to base': rollupFeature.isEnabled && rollupFeature.parentChainName ? `Sent to ${ rollupFeature.parentChainName }` : 'Sent to parent chain', | ||
'Confirmed on base': rollupFeature.isEnabled && rollupFeature.parentChainName ? | ||
`Confirmed on ${ rollupFeature.parentChainName }` : | ||
'Confirmed on parent chain', | ||
}; | ||
|
||
export const verificationSteps = (() => { | ||
return ARBITRUM_L2_TX_BATCH_STATUSES.map((status) => VERIFICATION_STEPS_MAP[status]); | ||
})(); | ||
|
||
export function getVerificationStepStatus({ | ||
status, | ||
commitment_transaction: commitTx, | ||
confirmation_transaction: confirmTx, | ||
}: Args) { | ||
if (status === 'Sent to base') { | ||
if (commitTx.status === 'unfinalized') { | ||
return 'pending'; | ||
} | ||
} | ||
if (status === 'Confirmed on base') { | ||
if (confirmTx.status === 'unfinalized') { | ||
return 'pending'; | ||
} | ||
} | ||
return 'finalized'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+7.56 KB
ui/tx/details/__screenshots__/TxInfo.pw.tsx_default_arbitrum-L1-status-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.