Skip to content

Commit

Permalink
chore: re-add block explorer link to transaction header (#1313)
Browse files Browse the repository at this point in the history
  • Loading branch information
LuizAsFight committed May 27, 2024
1 parent 9ffddf7 commit b576632
Show file tree
Hide file tree
Showing 11 changed files with 483 additions and 147 deletions.
5 changes: 5 additions & 0 deletions .changeset/brown-deers-retire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"fuels-wallet": patch
---

Fix error not showing on Dapp Approve transaction
5 changes: 5 additions & 0 deletions .changeset/odd-islands-behave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"fuels-wallet": patch
---

Re-add block explorer link to transaction header
2 changes: 1 addition & 1 deletion examples/cra-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"@fuels/connectors": "0.4.0",
"@fuels/react": "0.19.0",
"@fuels/react": "0.20.0",
"@tanstack/react-query": "5.28.4",
"fuels": "0.84.0",
"react": "18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@biomejs/biome": "1.6.1",
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
"@fuels/ts-config": "0.19.0",
"@fuels/ts-config": "0.20.0",
"@jest/types": "29.6.3",
"@playwright/test": "1.39.0",
"@types/jest": "^29.5.5",
Expand Down
1 change: 1 addition & 0 deletions packages/app/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ VITE_CRX_NAME="Fuel Wallet Development"
VITE_CRX_VERSION_API="https://fuellabs.github.io/fuels-wallet/latest.json"
VITE_FUEL_PROVIDER_URL=http://localhost:4000/v1/graphql
VITE_FUEL_FAUCET_URL=http://localhost:4040
VITE_EXPLORER_URL=https://app.fuel.network/
VITE_MNEMONIC_WORDS=12
VITE_ADDR_OWNER=0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298
GENESIS_SECRET=0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298
Expand Down
8 changes: 4 additions & 4 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
"@fuel-ui/react": "0.23.3",
"@fuel-ui/test-utils": "0.17.0",
"@fuel-wallet/connections": "workspace:*",
"@fuels/assets": "0.19.0",
"@fuels/local-storage": "0.19.0",
"@fuels/react": "0.19.0",
"@fuels/react-xstore": "0.19.0",
"@fuels/assets": "0.20.0",
"@fuels/local-storage": "0.20.0",
"@fuels/react": "0.20.0",
"@fuels/react-xstore": "0.20.0",
"@hookform/resolvers": "3.3.2",
"@react-aria/utils": "3.21.0",
"@sentry/browser": "7.73.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ export const TxHeader: TxHeaderComponent = ({
type,
providerUrl = '',
}) => {
const { href: _href, openExplorer: _openExplorer } = useExplorerLink(
providerUrl,
id
);
const { href, openExplorer } = useExplorerLink(providerUrl, id);

return (
<Card css={styles.root}>
Expand All @@ -56,7 +53,7 @@ export const TxHeader: TxHeaderComponent = ({
}}
tooltipMessage="Copy Transaction ID"
/>
{/* <Copyable
<Copyable
value={href}
tooltipMessage="Copy Transaction Link"
iconProps={{
Expand All @@ -71,7 +68,7 @@ export const TxHeader: TxHeaderComponent = ({
onClick={openExplorer}
aria-label="Open explorer"
/>
</Tooltip> */}
</Tooltip>
</Box.Flex>
</Box.Flex>
<Box.Flex css={{ ...styles.row, ...styles.type }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ export class TxService {
const transaction = transactionRequest.toTransaction();
const transactionBytes = transactionRequest.toTransactionBytes();

const simulateTxErrors = getGroupedErrors(e.response?.errors);
const errorsToParse =
e.name === 'FuelError' ? [{ message: e.message }] : e.response?.errors;
const simulateTxErrors = getGroupedErrors(errorsToParse);

const gasPrice = await provider.getLatestGasPrice();
const txSummary = assembleTransactionSummary({
receipts: [],
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@fuel-ui/icons": "0.23.3",
"@fuel-ui/react": "0.23.3",
"@fuels/connectors": "0.4.0",
"@fuels/react": "0.19.0",
"@fuels/react": "0.20.0",
"@mdx-js/react": "^2.3.0",
"@next/mdx": "14.2.3",
"@tanstack/react-query": "5.28.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e-contract-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@fuels/connectors": "0.4.0",
"@fuels/react": "0.19.0",
"@fuels/react": "0.20.0",
"@tanstack/react-query": "5.28.4",
"fuels": "0.84.0",
"react": "^18.2.0",
Expand All @@ -22,7 +22,7 @@
},
"devDependencies": {
"@fuel-wallet/types": "workspace:*",
"@fuels/playwright-utils": "0.19.0",
"@fuels/playwright-utils": "0.20.0",
"@playwright/test": "^1.39.0",
"@types/chrome": "^0.0.246",
"@types/node": "^20.8.4",
Expand Down
Loading

0 comments on commit b576632

Please sign in to comment.