Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into rubyto-eco-page
Browse files Browse the repository at this point in the history
  • Loading branch information
LuizAsFight authored Jan 23, 2024
2 parents a749f84 + 03229dd commit 8c7db10
Show file tree
Hide file tree
Showing 7 changed files with 209 additions and 1,846 deletions.
1 change: 0 additions & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"@vitejs/plugin-react": "^4.0.0",
"@xstate/cli": "^0.4.2",
"adm-zip": "^0.5.10",
"jdown": "^1.0.5",
"npm-run-all": "^4.1.5",
"prop-types": "^15.8.1",
"storybook": "^7.2.2",
Expand Down
8 changes: 8 additions & 0 deletions packages/app/playwright/e2e/Bridge.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ test.describe('Bridge', () => {
await page.locator(':nth-match(:text("Done"), 1)').waitFor();

// Check toast success feedback of tx created
// Toast message has delay of 2 seconds
await page.waitForTimeout(2000);
await hasText(page, INITIATE_DEPOSIT);
await page.locator(':nth-match(:text("Done"), 3)').waitFor();

Expand Down Expand Up @@ -215,6 +217,8 @@ test.describe('Bridge', () => {
await page.locator(':nth-match(:text("Done"), 1)').waitFor();

// Check toast success feedback of tx created
// Toast message has delay of 2 seconds
await page.waitForTimeout(2000);
await hasText(page, INITIATE_WITHDRAW);

// check time left feedback
Expand Down Expand Up @@ -388,6 +392,8 @@ test.describe('Bridge', () => {
await page.locator(':nth-match(:text("Done"), 1)').waitFor();

// Check toast success feedback of tx created
// Toast message has delay of 2 seconds
await page.waitForTimeout(2000);
await hasText(page, INITIATE_DEPOSIT);
await page.locator(':nth-match(:text("Done"), 2)').waitFor();
});
Expand Down Expand Up @@ -498,6 +504,8 @@ test.describe('Bridge', () => {
await page.locator(':nth-match(:text("Done"), 1)').waitFor();

// Check toast success feedback of tx created
// Toast message has delay of 2 seconds
await page.waitForTimeout(2000);
await hasText(page, INITIATE_WITHDRAW);

// check time left feedback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const BridgeTxOverview = ({
<Box.Stack css={styles.stack}>
<Box.Flex css={styles.txItem}>
<Text css={styles.labelText}>ID</Text>
<Link href={explorerLink} isExternal css={styles.infoText}>
<Link href={explorerLink} isExternal css={styles.linkText}>
<Box aria-label="Transaction ID">{transactionId.toString()}</Box>
</Link>
</Box.Flex>
Expand Down Expand Up @@ -100,6 +100,10 @@ const styles = {
fontSize: '$sm',
color: '$intentsBase12',
}),
linkText: cssObj({
fontSize: '$sm',
color: '$intentsPrimary9',
}),
directionInfo: cssObj({
gap: '$1',
alignItems: 'center',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,12 @@ export const txEthToFuelMachine = createMachine(
}),
notifyEthTxSuccess: (ctx) => {
if (ctx.ethTxId && EthTxCache.getTxIsCreated(ctx.ethTxId)) {
toast.success(
'Deposit successfully initiated. You may now close the popup.',
{ duration: 5000 }
);
setTimeout(() => {
toast.success(
'Deposit successfully initiated. You may now close the popup.',
{ duration: 5000 }
);
}, 2000);
EthTxCache.removeTxCreated(ctx.ethTxId);
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const txFuelToEthSelectors = {
isSelected: status.isConfirmTransactionSelected,
},
{
name: 'Receive on ETH',
name: 'Receive on Ethereum',
status: status.isReceiveDone ? 'Done!' : 'Automatic',
isLoading: status.isReceiveLoading,
isDone: status.isReceiveDone,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,10 +407,12 @@ export const txFuelToEthMachine = createMachine(
},
notifyFuelTxSuccess: (ctx) => {
if (ctx.fuelTxId && FuelTxCache.getTxIsCreated(ctx.fuelTxId)) {
toast.success(
'Withdraw successfully initiated. You may now close the popup.',
{ duration: 5000 }
);
setTimeout(() => {
toast.success(
'Withdraw successfully initiated. You may now close the popup.',
{ duration: 5000 }
);
}, 2000);
FuelTxCache.removeTxCreated(ctx.fuelTxId);
}
},
Expand Down
Loading

0 comments on commit 8c7db10

Please sign in to comment.