Skip to content

Commit

Permalink
Add the local case to the network string conversion function and na…
Browse files Browse the repository at this point in the history
…rrow `Account` type to `Ed25519Account` in example (#298)

* Narrow `Account` typing and add the `local` case to the network string conversion function.

* Remove `Account` => `Ed25519` account as it's already in another PR

Update changeset

---------

Co-authored-by: matt <xbtmatt@gmail.com>
Co-authored-by: Maayan <maayan@aptoslabs.com>
  • Loading branch information
3 people authored Jun 3, 2024
1 parent 1868034 commit cc4021b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/honest-monkeys-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@aptos-labs/wallet-adapter-core": patch
---

Add the `local` case to the switch statement that converts a string to a Network.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export function convertNetwork(
return Network.TESTNET;
case "devnet" as Network:
return Network.DEVNET;
case "local" as Network:
return Network.LOCAL;
default:
throw new Error("Invalid Aptos network name");
}
Expand Down

0 comments on commit cc4021b

Please sign in to comment.