-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
afbcacc
commit ebc47b3
Showing
14 changed files
with
114 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ | |
/test-results/ | ||
/playwright-report/ | ||
/playwright/.cache/ | ||
/public/localnet-config.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,31 @@ | ||
import { Asset } from "@chain-registry/types"; | ||
import { localnetConfigAtom } from "atoms/integrations"; | ||
import { getDefaultStore } from "jotai"; | ||
import namadaShieldedSvg from "./assets/namada-shielded.svg"; | ||
|
||
const { VITE_LOCALNET: localnet = false, VITE_LOCALNET_NAM_TOKEN: localToken } = | ||
import.meta.env; | ||
// We can't return "satisfies Asset" from fn | ||
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type | ||
export const namadaAsset = () => { | ||
const store = getDefaultStore(); | ||
const config = store.get(localnetConfigAtom); | ||
const localNamAddress = config.data?.tokenAddress; | ||
|
||
export const namadaAsset = { | ||
name: "Namada", | ||
base: "unam", | ||
address: | ||
localnet && localToken ? localToken : ( | ||
"tnam1qxp7u2vmlgcrpn9j0ml7hrtr79g2w2fdesteh7tu" | ||
), | ||
display: "nam", | ||
symbol: "NAM", | ||
denom_units: [ | ||
{ | ||
denom: "unam", | ||
exponent: 0, | ||
}, | ||
{ | ||
denom: "nam", | ||
exponent: 6, | ||
}, | ||
], | ||
logo_URIs: { svg: namadaShieldedSvg }, | ||
} satisfies Asset; | ||
return { | ||
name: "Namada", | ||
base: "unam", | ||
address: localNamAddress || "tnam1qxp7u2vmlgcrpn9j0ml7hrtr79g2w2fdesteh7tu", | ||
display: "nam", | ||
symbol: "NAM", | ||
denom_units: [ | ||
{ | ||
denom: "unam", | ||
exponent: 0, | ||
}, | ||
{ | ||
denom: "nam", | ||
exponent: 6, | ||
}, | ||
], | ||
logo_URIs: { svg: namadaShieldedSvg }, | ||
} satisfies Asset; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters