Skip to content

Commit

Permalink
Merge pull request #171 from terra-money/staging
Browse files Browse the repository at this point in the history
7.2.7
  • Loading branch information
terran6 authored May 31, 2023
2 parents e355279 + 7c1bcc5 commit 1e5c419
Show file tree
Hide file tree
Showing 36 changed files with 1,402 additions and 149 deletions.
233 changes: 227 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@ledgerhq/hw-transport-web-ble": "^6.27.1",
"@mui/icons-material": "^5.8.0",
"@mui/material": "^5.9.1",
"@sentry/react": "^7.53.1",
"@terra-money/feather.js": "^1.0.4",
"@terra-money/ledger-station-js": "^1.3.7",
"@terra-money/log-finder-ruleset": "^3.0.3",
Expand Down
2 changes: 1 addition & 1 deletion public/firefox.manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Station Wallet",
"version": "7.2.6.1",
"version": "7.2.7",
"background": {
"scripts": ["background.js"],
"persistent": true
Expand Down
2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Station Wallet",
"version": "7.2.6.1",
"version": "7.2.7",
"background": {
"service_worker": "background.js",
"type": "module"
Expand Down
13 changes: 9 additions & 4 deletions src/app/InitBankBalance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,21 @@ const InitBankBalance = ({ children }: PropsWithChildren<{}>) => {
[] as CoinBalance[]
)

native.list.forEach(({ denom }) => {
if (!bankBalance.find((balance) => balance.denom === denom)) {
const token = whitelist[networkName][denom]
native.list.forEach(({ id }) => {
const [chain, denom] = id.split(":")
if (
!bankBalance.find(
(balance) => balance.denom === denom && balance.chain === chain
)
) {
const token = whitelist[networkName][id]

if (!token || !token.chains || token.chains.length === 0) return

bankBalance.push({
denom,
amount: "0",
chain: token.chains[0],
chain,
})
}
})
Expand Down
4 changes: 2 additions & 2 deletions src/app/InitChains.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const InitChains = ({ children }: PropsWithChildren<{}>) => {

useEffect(() => {
axios
.get("/coins.json", { baseURL: STATION_ASSETS })
.get("/denoms.json", { baseURL: STATION_ASSETS })
.then(({ data }) => setWhitelist(data))
axios
.get("/ibc_denoms.json", { baseURL: STATION_ASSETS })
.get("/ibc.json", { baseURL: STATION_ASSETS })
.then(({ data }) => setIbcDenoms(data))
axios
.get("/station/coins.json", { baseURL: ASSETS })
Expand Down
8 changes: 5 additions & 3 deletions src/components/layout/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface Props extends QueryState {
small?: boolean
sub?: boolean // used as a page in a page
invisible?: boolean // used as a page in a page with no margin
backButton?: boolean
backButtonPath?: string
}

const Page = (props: PropsWithChildren<Props>) => {
Expand All @@ -29,7 +29,7 @@ const Page = (props: PropsWithChildren<Props>) => {
sub,
invisible,
mainClassName,
backButton,
backButtonPath,
} = props

return (
Expand All @@ -43,7 +43,9 @@ const Page = (props: PropsWithChildren<Props>) => {
{title && (
<header className={styles.header}>
<div className={styles.titleWrapper}>
{backButton && <ArrowBack onClick={() => navigate(-1)} />}
{backButtonPath && (
<ArrowBack onClick={() => navigate(backButtonPath)} />
)}
<h1 className={styles.title}>{title}</h1>
</div>
{extra}
Expand Down
Loading

0 comments on commit 1e5c419

Please sign in to comment.