Skip to content

Commit 251fa3d

Browse files
authored
Merge branch 'master' into hf/fix/ui
2 parents 2a23fe9 + 9fbe962 commit 251fa3d

File tree

5 files changed

+22
-24
lines changed

5 files changed

+22
-24
lines changed

.changeset/brown-geckos-shout.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"fuels-wallet": patch
3+
---
4+
5+
chore: remove label in loading state

.changeset/popular-mails-argue.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

packages/app/playwright/e2e/RecoverWallet.test.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ test.describe('RecoverWallet', () => {
9999
},
100100
{ timeout: 1000 }
101101
)
102-
.toBe(words.length);
102+
.toBeGreaterThanOrEqual(words.length);
103103
const inputs = await page.locator('input').all();
104104
words.forEach((word, i) => {
105105
expect(inputs[i]).toHaveValue(word);
@@ -148,7 +148,11 @@ test.describe('RecoverWallet', () => {
148148
await getButtonByText(page, /Paste/i).click();
149149

150150
/** Confirm the auto-selected mnemonic size */
151-
expect(format).toHaveValue('15');
151+
await expect
152+
.poll(async () =>
153+
(await getByAriaLabel(page, 'Select format')).inputValue()
154+
)
155+
.toBe('15');
152156

153157
/** Confirm Mnemonic */
154158
const words = WORDS_13.split(' ');

packages/app/src/systems/Account/components/QuickAccountConnect/QuickAccountConnect.tsx

+9-19
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
VStack,
1010
toast,
1111
} from '@fuel-ui/react';
12-
import { useEffect, useMemo, useState } from 'react';
12+
import { useMemo, useState } from 'react';
1313
import { useCurrentTab } from '~/systems/CRX/hooks/useCurrentTab';
1414
import { useConnection } from '~/systems/DApp/hooks/useConnection';
1515
import { useOrigin } from '~/systems/DApp/hooks/useOrigin';
@@ -22,10 +22,6 @@ enum ConnectionStatus {
2222
NoAccounts = 'NO_ACCOUNTS',
2323
}
2424

25-
export const getDismissKey = (account: string, origin: string) => {
26-
return `quick-account-connect-${account}-${origin}`;
27-
};
28-
2925
export const QuickAccountConnect = () => {
3026
const { account } = useCurrentAccount();
3127
const { currentTab } = useCurrentTab();
@@ -34,7 +30,7 @@ export const QuickAccountConnect = () => {
3430
origin: origin?.full,
3531
});
3632

37-
const [dismissed, setDismissed] = useState(true);
33+
const [dismissedAccount, setDismissedAccount] = useState<string>('');
3834

3935
const status = useMemo<ConnectionStatus>(() => {
4036
if (!account || !connection) {
@@ -48,6 +44,10 @@ export const QuickAccountConnect = () => {
4844
return ConnectionStatus.OtherAccount;
4945
}, [account, connection]);
5046

47+
const isDismissed = useMemo<boolean>(() => {
48+
return account?.address === dismissedAccount;
49+
}, [account?.address, dismissedAccount]);
50+
5151
const onConnect = async () => {
5252
if (!origin || !account) return;
5353
await ConnectionService.addAccountTo({
@@ -59,25 +59,15 @@ export const QuickAccountConnect = () => {
5959
};
6060

6161
const onDismiss = () => {
62-
if (!origin || !account) return;
63-
setDismissed(true);
64-
if (typeof localStorage !== 'undefined') {
65-
localStorage.setItem(getDismissKey(account.address, origin.full), 'true');
62+
if (account?.address) {
63+
setDismissedAccount(account.address);
6664
}
6765
};
6866

69-
useEffect(() => {
70-
if (!origin || !account) return;
71-
const hasDismissed = localStorage.getItem(
72-
getDismissKey(account.address, origin.full)
73-
);
74-
setDismissed(!!hasDismissed);
75-
}, [account, origin]);
76-
7767
return (
7868
<Box
7969
css={styles.wrapper}
80-
data-open={status === ConnectionStatus.OtherAccount && !dismissed}
70+
data-open={status === ConnectionStatus.OtherAccount && !isDismissed}
8171
>
8272
<Alert status="info" css={styles.alert}>
8373
<Alert.Description as="div">

packages/app/src/systems/Transaction/components/TxFee/TxFeeLoader.tsx

-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ import { styles } from './styles';
66

77
export const TxFeeLoader = (props: ContentLoaderProps) => (
88
<Card css={styles.detailItem()}>
9-
<Text color="intentsBase11" css={styles.title}>
10-
Fee (network)
11-
</Text>
129
<TxFeeAmountLoader {...props} />
1310
</Card>
1411
);

0 commit comments

Comments
 (0)