Skip to content

Commit

Permalink
feat: use receipts on TxScripts
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Oct 20, 2023
1 parent 56d16de commit 1e1454a
Show file tree
Hide file tree
Showing 22 changed files with 2,121 additions and 1,774 deletions.
12 changes: 12 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ module.exports = {
{ prefer: 'type-imports', fixStyle: 'separate-type-imports' },
],
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
'import/order': [
'error',
{
groups: [
['builtin', 'external', 'internal'],
['parent'],
['sibling', 'index'],
],
'newlines-between': 'always',
alphabetize: { order: 'asc' },
},
],
'no-html-link-for-pages': 'off',
'react-hooks/rules-of-hooks': 'off',
'react/jsx-sort-props': [
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
"lint": "run-s lint:check prettier:check",
"lint:check": "eslint .",
"lint:fix": "pnpm lint:check --fix",
"node:clean": "make -C ./docker clean",
"node:logs": "make -C ./docker logs",
"node:restart": "make -C ./docker restart",
"node:start": "make -C ./docker start",
"node:stop": "make -C ./docker stop",
"node:clean": "make -C ./docker clean",
"node:logs": "make -C ./docker logs",
"node:reset": "run-s node:stop node:clean node:start",
"prepare": "husky install",
"prettier:check": "prettier --check .",
"prettier:format": "prettier --write .",
Expand All @@ -56,15 +56,15 @@
"@fuels/prettier-config": "^0.1.1",
"@fuels/ts-config": "^0.1.1",
"jest": "29.7.0",
"lint-staged": "15.0.1"
"lint-staged": "15.0.2"
},
"devDependencies": {
"@fuels/tsup-config": "^0.1.1",
"@next/eslint-plugin-next": "^13.5.5",
"@next/eslint-plugin-next": "^13.5.6",
"@swc/core": "1.3.93",
"@swc/jest": "0.2.29",
"@types/jest": "29.5.5",
"@types/node": "20.8.6",
"@types/jest": "29.5.6",
"@types/node": "20.8.7",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"eslint": "^8.51.0",
Expand All @@ -85,10 +85,10 @@
"prettier": "^3.0.3",
"ts-node": "10.9.1",
"tsup": "7.2.0",
"turbo": "^1.10.15",
"turbo": "^1.10.16",
"typescript": "5.2.2",
"updates": "^15.0.2",
"next": "13.5.5"
"next": "13.5.6"
},
"pnpm": {
"peerDependencyRules": {
Expand Down
38 changes: 19 additions & 19 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
},
"dependencies": {
"@faker-js/faker": "8.2.0",
"@fontsource-variable/inter": "5.0.13",
"@fontsource-variable/inter": "5.0.14",
"@fuel-explorer/graphql": "workspace:*",
"@fuel-ts/math": "0.63.0",
"@fuel-wallet/sdk": "0.13.2",
"@fuel-wallet/sdk": "0.13.3",
"@fuels/assets": "0.1.1",
"@fuels/ui": "workspace:*",
"@tabler/icons-react": "2.39.0",
Expand All @@ -31,7 +31,7 @@
"graphql-request": "6.1.0",
"graphql-tag": "2.12.6",
"graphql-yoga": "5.0.0",
"next": "13.5.5",
"next": "13.5.6",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-json-view-lite": "1.1.0",
Expand All @@ -43,37 +43,37 @@
},
"devDependencies": {
"@babel/core": "^7.23.2",
"@storybook/addon-a11y": "^7.5.0",
"@storybook/addon-actions": "^7.5.0",
"@storybook/addon-essentials": "^7.5.0",
"@storybook/addon-interactions": "^7.5.0",
"@storybook/addon-links": "^7.5.0",
"@storybook/addon-storysource": "^7.5.0",
"@storybook/addon-viewport": "7.5.0",
"@storybook/addons": "^7.5.0",
"@storybook/nextjs": "^7.5.0",
"@storybook/react": "^7.5.0",
"@storybook/addon-a11y": "^7.5.1",
"@storybook/addon-actions": "^7.5.1",
"@storybook/addon-essentials": "^7.5.1",
"@storybook/addon-interactions": "^7.5.1",
"@storybook/addon-links": "^7.5.1",
"@storybook/addon-storysource": "^7.5.1",
"@storybook/addon-viewport": "7.5.1",
"@storybook/addons": "^7.5.1",
"@storybook/nextjs": "^7.5.1",
"@storybook/react": "^7.5.1",
"@storybook/testing-library": "^0.2.2",
"@storybook/types": "^7.5.0",
"@storybook/types": "^7.5.1",
"@svgr/webpack": "8.1.0",
"@testing-library/dom": "9.3.3",
"@testing-library/jest-dom": "6.1.4",
"@types/node": "20.8.6",
"@types/react": "^18.2.28",
"@types/react-dom": "^18.2.13",
"@types/node": "20.8.7",
"@types/react": "^18.2.30",
"@types/react-dom": "^18.2.14",
"@xstate/cli": "^0.5.7",
"autoprefixer": "10.4.16",
"postcss": "8.4.31",
"postcss-import": "15.1.0",
"radix-ui-themes-with-tailwind": "1.2.6",
"storybook": "^7.5.0",
"storybook": "^7.5.1",
"storybook-addon-theme": "workspace:*",
"tailwindcss": "3.3.3",
"tailwindcss-animate": "1.0.7",
"tailwindcss-radix": "2.8.0",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "5.2.2",
"vite": "^4.4.11",
"vite": "^4.5.0",
"vite-tsconfig-paths": "^4.2.1"
},
"browser": {
Expand Down
22 changes: 12 additions & 10 deletions packages/app/src/systems/Core/components/EmptyCard/EmptyCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,26 @@ import { tv } from 'tailwind-variants';

import { ReactComponent as EmptySvg } from './empty.svg';

export type EmptyCardProps = CardProps;
export type EmptyCardProps = CardProps & { hideImage?: boolean };
export type EmptyCardTitleProps = HeadingProps;
export type EmptyCardDescriptionProps = TextProps;

export const EmptyCardRoot = createComponent<EmptyCardProps, typeof Card>({
id: 'EmptyCard',
render: (_, { children, className, ...props }) => {
render: (_, { children, className, hideImage, ...props }) => {
const classes = styles({ className });
return (
<Card {...props} className={classes.root({ className })}>
<EmptySvg
width={80}
height={80}
viewBox="0 0 682.66 682.66"
className={classes.image({
className: '[&_path]:stroke-[8] text-muted',
})}
/>
{!hideImage && (
<EmptySvg
width={80}
height={80}
viewBox="0 0 682.66 682.66"
className={classes.image({
className: '[&_path]:stroke-[8] text-muted',
})}
/>
)}
{children}
</Card>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/systems/Core/components/Layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function Layout({ children, hero }: LayoutProps) {
>
Bridge
</Nav.MenuItem>
<Nav.MenuItem isActive asChild>
<Nav.MenuItem isActive>
<Link href="/">Explorer</Link>
</Nav.MenuItem>
<Nav.MenuItem
Expand Down
14 changes: 8 additions & 6 deletions packages/app/src/systems/Core/utils/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import { resolveIconPath, assets } from '@fuels/assets';

export const ASSET_LIST = resolveIconPath('/assets', assets);

export function findAssetById(assetId: string) {
return ASSET_LIST.find((asset) => {
const network = asset.networks?.find((val) => val.type === 'fuel');
const id = network ? (network as any).assetId : null;
return id === assetId;
});
export function findAssetById(assetId?: string) {
return (
ASSET_LIST.find((asset) => {
const network = asset.networks?.find((val) => val.type === 'fuel');
const id = network ? (network as any).assetId : null;
return id === assetId;
}) ?? null
);
}
117 changes: 0 additions & 117 deletions packages/app/src/systems/Transaction/__mocks__/abi.ts

This file was deleted.

342 changes: 342 additions & 0 deletions packages/app/src/systems/Transaction/__mocks__/receipts.ts

Large diffs are not rendered by default.

This file was deleted.

Loading

0 comments on commit 1e1454a

Please sign in to comment.