Skip to content

Commit

Permalink
Merge branch 'main' into env/mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
canhtrinh committed Jan 18, 2024
2 parents 8359973 + 4a8e917 commit 722d7f8
Show file tree
Hide file tree
Showing 11 changed files with 429 additions and 378 deletions.
2 changes: 1 addition & 1 deletion apps/maestro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"tailwindcss": "^3.4.1",
"tsx": "^4.7.0",
"typescript": "^5.3.3",
"vitest": "^0.34.6",
"vitest": "^1.2.1",
"zx": "^7.2.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export const CONTRACT_METHODS_LABELS: Partial<
InterchainTransfer: "Interchain Transfer",
InterchainTokenDeploymentStarted: (
<>
Interchain <span className="mx-1 hidden md:block">Token</span> Deployment
Interchain <span className="mx-1 hidden md:inline-block">Token</span>{" "}
Deployment
</>
),
};
Expand Down
29 changes: 19 additions & 10 deletions apps/maestro/src/features/Transactions/Transactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,19 @@ function useGroupedStatuses(txHash: `0x${string}`) {
}, [computed.indexedById, statuses, txHash]);
}

const ToastElement: FC<{
type ToastElementProps = {
txHash: `0x${string}`;
chainId: number;
txType?: TxType;
}> = ({ txHash, chainId, txType }) => {
onRemoveTx?: (txHash: `0x${string}`) => void;
};

const ToastElement: FC<ToastElementProps> = ({
txHash,
chainId,
txType,
onRemoveTx,
}) => {
const { elapsedBlocks, expectedConfirmations, progress } = useGMPTxProgress(
txHash,
chainId
Expand Down Expand Up @@ -144,8 +152,6 @@ const ToastElement: FC<{
</>
);

const [, actions] = useTransactionsContainer();

const handleDismiss = useCallback(() => {
toast.dismiss(txHash);

Expand All @@ -155,9 +161,9 @@ const ToastElement: FC<{
(x) => x.status === "error" || x.status === "insufficient_fee"
)
) {
actions.removeTransaction(txHash);
onRemoveTx?.(txHash);
}
}, [actions, groupedStatusesProps, txHash]);
}, [groupedStatusesProps, onRemoveTx, txHash]);

return (
<div className="bg-base-300 border-base-200 relative grid gap-2 rounded-md p-2 pl-4 pr-8 shadow-md shadow-black/10">
Expand Down Expand Up @@ -223,10 +229,13 @@ const GMPTransaction: FC<GMPTxStatusProps> = (props) => {
actions.removeTransaction(props.txHash);
}

toast.custom(<ToastElement {...props} />, {
id: props.txHash,
duration: Infinity,
});
toast.custom(
<ToastElement {...props} onRemoveTx={actions.removeTransaction} />,
{
id: props.txHash,
duration: Infinity,
}
);

// eslint-disable-next-line @typescript-eslint/no-floating-promises
task(props.txHash);
Expand Down
5 changes: 3 additions & 2 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,16 @@
"@axelarjs/config": "workspace:*",
"@axelarjs/utils": "workspace:*",
"@types/node": "^20.11.2",
"dotenv": "^16.3.1",
"fast-check": "^3.15.0",
"happy-dom": "^9.20.3",
"matchers": "link:@testing-library/jest-dom/matchers",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^5.0.5",
"typescript": "^5.3.3",
"vite": "4.4.9",
"vitest": "^0.34.6"
"vite": "^5.0.11",
"vitest": "^1.2.1"
},
"peerDependencies": {
"unfetch": "<=4.2"
Expand Down
3 changes: 2 additions & 1 deletion packages/cosmos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@
"devDependencies": {
"@tsconfig/strictest": "^2.0.2",
"cosmjs-types": "^0.8.0",
"dotenv": "^16.3.1",
"rambda": "^8.6.0",
"rimraf": "^5.0.5",
"typescript": "^5.3.3",
"vitest": "^0.34.6"
"vitest": "^1.2.1"
}
}
2 changes: 1 addition & 1 deletion packages/cosmos/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default defineConfig({
test: {
testTimeout: 300000,
environment: "node",
exclude: ["**/node_modules/**", "build/**"],
exclude: ["**/node_modules/**", "build/**", "**/*.js"],
globals: true,
setupFiles: ["dotenv/config"],
},
Expand Down
2 changes: 1 addition & 1 deletion packages/deposit-address/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"dotenv": "^16.3.1",
"rimraf": "^5.0.5",
"typescript": "^5.3.3",
"vitest": "^0.34.6"
"vitest": "1.2.1"
},
"dependencies": {
"@axelarjs/api": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/transaction-recovery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"dotenv": "^16.3.1",
"rimraf": "^5.0.5",
"typescript": "^5.3.3",
"vitest": "^0.34.6"
"vitest": "^1.2.1"
},
"dependencies": {
"@axelarjs/api": "workspace:*",
Expand Down
28 changes: 14 additions & 14 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,18 @@
},
"devDependencies": {
"@inquirer/prompts": "^3.3.0",
"@storybook/addon-essentials": "^7.6.8",
"@storybook/addon-interactions": "^7.6.8",
"@storybook/addon-links": "^7.6.8",
"@storybook/addons": "^7.6.8",
"@storybook/blocks": "^7.6.8",
"@storybook/client-logger": "^7.6.8",
"@storybook/preview-api": "^7.6.8",
"@storybook/react": "^7.6.8",
"@storybook/react-vite": "^7.6.8",
"@storybook/addon-essentials": "^7.6.10",
"@storybook/addon-interactions": "^7.6.10",
"@storybook/addon-links": "^7.6.10",
"@storybook/addons": "^7.6.10",
"@storybook/blocks": "^7.6.10",
"@storybook/client-logger": "^7.6.10",
"@storybook/preview-api": "^7.6.10",
"@storybook/react": "^7.6.10",
"@storybook/react-vite": "^7.6.10",
"@storybook/testing-library": "^0.2.2",
"@storybook/theming": "^7.6.8",
"@storybook/types": "^7.6.8",
"@storybook/theming": "^7.6.10",
"@storybook/types": "^7.6.10",
"@svgr/cli": "^7.0.0",
"@tailwindcss/typography": "^0.5.10",
"@testing-library/jest-dom": "^5.17.0",
Expand All @@ -122,15 +122,15 @@
"prettier-plugin-tailwindcss": "^0.3.0",
"pretty-quick": "^3.1.3",
"prop-types": "^15.8.1",
"storybook": "^7.6.8",
"storybook": "^7.6.10",
"tailwindcss": "^3.4.1",
"tailwindcss-animate": "^1.0.7",
"tailwindcss-radix": "^2.8.0",
"tsup": "^8.0.1",
"tsx": "^4.7.0",
"typescript": "^5.3.3",
"vite": "4.4.9",
"vitest": "^0.34.6",
"vite": "^5.0.11",
"vitest": "^1.2.1",
"zx": "^7.2.3"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
"react-dom": "^18.2.0",
"rimraf": "^5.0.5",
"typescript": "^5.3.3",
"vite": "4.4.9",
"vitest": "^0.34.6"
"vite": "^5.0.11",
"vitest": "^1.2.1"
},
"dependencies": {
"immer": "^10.0.3",
Expand Down
Loading

1 comment on commit 722d7f8

@vercel
Copy link

@vercel vercel bot commented on 722d7f8 Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.