Skip to content

Commit 56ca549

Browse files
committed
chore: fix bugbot issues
1 parent 722cd7f commit 56ca549

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

packages/snap/snap.manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://github.com/MetaMask/snap-solana-wallet.git"
88
},
99
"source": {
10-
"shasum": "ra21wzwid7WJlAcZ1UrdmbnmjLegUCt17Z73K6jFCjE=",
10+
"shasum": "RU8JVlVektw/1qIC53G/WQ4YEJ4ILwb6yl3Tbi4suEg=",
1111
"location": {
1212
"npm": {
1313
"filePath": "dist/bundle.js",

packages/snap/src/core/handlers/onNameLookup/onNameLookup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const onNameLookupHandler: OnNameLookupHandler = async (request) => {
1212
const { chainId, domain, address } = request;
1313

1414
if (domain) {
15-
const resolvedAddress = await nameResolutionService.resolveAddress(
15+
const resolvedAddress = await nameResolutionService.resolveDomain(
1616
chainId,
1717
domain,
1818
);
@@ -31,7 +31,7 @@ export const onNameLookupHandler: OnNameLookupHandler = async (request) => {
3131
}
3232

3333
if (address) {
34-
const resolvedDomain = await nameResolutionService.resolveDomain(
34+
const resolvedDomain = await nameResolutionService.resolveAddress(
3535
chainId,
3636
address,
3737
);

packages/snap/src/features/send/views/SendForm/events.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ describe('SendForm events', () => {
4040
},
4141
},
4242
},
43+
destinationAddressOrDomain: mockToAddress,
44+
domainResolutionStatus: null,
4345
scope: Network.Localnet,
4446
tokenPricesFetchStatus: 'initial',
4547
tokenPrices: {

packages/snap/src/features/send/views/SendForm/events.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,12 @@ async function onClearButtonClick({
417417
id: string;
418418
context: SendContext;
419419
}) {
420+
context.destinationAddressOrDomain = '';
420421
context.toAddress = '';
422+
context.domainResolutionStatus = null;
421423
context.error = null;
424+
context.validation[SendFormNames.DestinationAccountInput] = null;
425+
422426
await updateInterface(
423427
id,
424428
<Send context={context} inputToAddress={context.toAddress} />,

0 commit comments

Comments
 (0)