Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: stationmoney/station
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7.2.9
Choose a base ref
...
head repository: stationmoney/station
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 5,165 additions and 23,718 deletions.
  1. +4 −0 .dockerignore
  2. +2 −0 .env
  3. +4 −1 .gitignore
  4. +59 −0 Dockerfile
  5. +44 −0 docker-assets/haproxy.cfg
  6. +66 −0 docker-compose.yml
  7. +1,404 −21,958 package-lock.json
  8. +29 −24 package.json
  9. +16 −4 public/index.html
  10. +4 −0 src/app/App.tsx
  11. +1 −1 src/app/InitChains.tsx
  12. +18 −10 src/app/InitNetworks.tsx
  13. +2 −3 src/app/InitWallet.tsx
  14. +4 −0 src/app/components/ActionsBackground.module.scss
  15. +3 −1 src/app/components/Overlay.tsx
  16. +2 −7 src/app/containers/TxMessage.tsx
  17. +157 −0 src/app/sections/CoinTypeMnemonicForm.tsx
  18. +103 −0 src/app/sections/CoinTypePasswordForm.tsx
  19. +13 −11 src/app/sections/ConnectWallet.tsx
  20. +5 −2 src/app/sections/Connected.tsx
  21. +1 −1 src/app/sections/DisplayChainsSetting.tsx
  22. +41 −0 src/app/sections/EnableCoinType.tsx
  23. +1 −1 src/app/sections/LCDSetting.tsx
  24. +1 −1 src/app/sections/LanguageSetting.tsx
  25. +10 −1 src/app/sections/LatestTx.tsx
  26. +1 −1 src/app/sections/Nav.tsx
  27. +122 −0 src/app/sections/PageBanner.module.scss
  28. +37 −0 src/app/sections/PageBanner.tsx
  29. +6 −6 src/app/sections/Preferences.tsx
  30. +3 −3 src/app/sections/WelcomeModal.tsx
  31. +26 −0 src/app/update/UpdateNotification.module.scss
  32. +44 −0 src/app/update/UpdateNotification.tsx
  33. +23 −1 src/auth/auth.d.ts
  34. +14 −6 src/auth/hooks/useAddress.ts
  35. +91 −29 src/auth/hooks/useAuth.ts
  36. +32 −14 src/auth/hooks/useNetwork.ts
  37. +2 −2 src/auth/modules/create/CreateMultisigWalletForm.tsx
  38. +27 −9 src/auth/modules/create/CreateWalletWizard.tsx
  39. +4 −3 src/auth/modules/create/SelectAddress.tsx
  40. +1 −1 src/auth/modules/manage/ExportWalletForm.tsx
  41. +1 −1 src/auth/modules/select/SwitchWallet.tsx
  42. +3 −2 src/auth/networks/AddNetworkForm.tsx
  43. +6 −0 src/auth/scripts/is.ts
  44. +123 −21 src/auth/scripts/keystore.ts
  45. +2 −0 src/auth/scripts/network.ts
  46. +5 −1 src/auth/scripts/validate.ts
  47. +1 −1 src/components/display/NetworkStatus.tsx
  48. +1 −1 src/components/display/Tag.tsx
  49. +3 −1 src/components/form/FormHelp.tsx
  50. +6 −9 src/components/form/Input.tsx
  51. +1 −1 src/components/form/Select.tsx
  52. +5 −1 src/components/form/Selectors/AssetSelector/AssetSelector.tsx
  53. +1 −0 src/components/form/Selectors/ChainSelector/ChainList.tsx
  54. +1 −1 src/components/form/Selectors/TokenSelector/TokenList.tsx
  55. +2 −2 src/components/form/Submit.tsx
  56. +1 −1 src/components/general/Button.tsx
  57. +16 −5 src/components/general/External.tsx
  58. +16 −3 src/components/general/FinderLink.tsx
  59. +3 −1 src/components/general/LinkButton.tsx
  60. +1 −1 src/components/general/Pre.tsx
  61. +40 −0 src/components/general/StakingAssetLink.tsx
  62. +1 −0 src/components/general/index.ts
  63. +1 −3 src/components/layout/Card.tsx
  64. +11 −5 src/components/layout/ChainFilter.tsx
  65. +1 −1 src/components/layout/Contacts.tsx
  66. +1 −1 src/components/layout/Grid.tsx
  67. +1 −0 src/components/layout/OtherChainsButton.tsx
  68. +4 −0 src/components/layout/Page.module.scss
  69. +7 −2 src/components/layout/Page.tsx
  70. +3 −1 src/components/layout/PaginationButtons.tsx
  71. +4 −4 src/components/layout/SettingsSelector.tsx
  72. +4 −3 src/components/layout/SimpleChainList.tsx
  73. +8 −0 src/components/layout/Table.module.scss
  74. +3 −3 src/components/layout/Table.tsx
  75. +1 −1 src/components/layout/Tabs.tsx
  76. +23 −17 src/components/token/Read.tsx
  77. +3 −3 src/components/token/TokenCard.tsx
  78. +8 −7 src/config/constants.ts
  79. +2 −2 src/config/lang.ts
  80. +1 −1 src/data/Terra/TerraAPI.ts
  81. +1 −0 src/data/Terra/TerraAssets.ts
  82. +14 −6 src/data/external/osmosis.ts
  83. +124 −0 src/data/parsers/alliance-protocol.ts
  84. +168 −0 src/data/queries/alliance-protocol.ts
  85. +52 −5 src/data/queries/alliance.ts
  86. +1 −1 src/data/queries/bank.ts
  87. +36 −33 src/data/queries/chains.ts
  88. +7 −7 src/data/queries/coingecko.ts
  89. +8 −16 src/data/queries/distribution.ts
  90. +56 −38 src/data/queries/gov.ts
  91. +15 −5 src/data/queries/ibc.ts
  92. +0 −2 src/data/queries/lcdClient.ts
  93. +85 −27 src/data/queries/staking.ts
  94. +27 −1 src/data/queries/tx.ts
  95. +1 −1 src/data/queries/vesting.ts
  96. +8 −2 src/data/query.ts
  97. +1 −0 src/data/settings/CustomNetworks.ts
  98. +79 −30 src/data/token.tsx
  99. +52 −0 src/data/types/alliance-protocol.ts
  100. +32 −0 src/data/types/rewards-form.ts
  101. +20 −8 src/index.tsx
  102. +0 −64 src/pages/charts/LunaPriceChart.tsx
  103. +1 −1 src/pages/charts/StakingReturn.tsx
  104. +1 −1 src/pages/charts/TxVolume.tsx
  105. +1 −1 src/pages/charts/Wallets.tsx
  106. +3 −3 src/pages/charts/components/ChartContainer.tsx
  107. +2 −2 src/pages/custom/ManageCustomTokens.tsx
  108. +1 −1 src/pages/custom/ManageCustomTokensCW721.tsx
  109. +2 −2 src/pages/dashboard/CommunityPool.tsx
  110. +0 −49 src/pages/dashboard/LunaPrice.tsx
  111. +3 −3 src/pages/gov/GovernanceParams.tsx
  112. +2 −2 src/pages/gov/ProposalDepositors.tsx
  113. +4 −2 src/pages/gov/ProposalDeposits.tsx
  114. +4 −1 src/pages/gov/ProposalDescription.tsx
  115. +5 −3 src/pages/gov/ProposalSummary.tsx
  116. +6 −4 src/pages/gov/ProposalVotes.tsx
  117. +2 −1 src/pages/gov/ProposalsByStatus.tsx
  118. +0 −1 src/pages/gov/components/VoteProgress.tsx
  119. +6 −4 src/pages/history/HistoryItem.tsx
  120. +38 −4 src/pages/history/HistoryList.tsx
  121. +1 −1 src/pages/labs/Pairs.tsx
  122. +2 −1 src/pages/multisig/PostMultisigTxForm.tsx
  123. +2 −1 src/pages/multisig/SignMultisigTxForm.tsx
  124. +2 −2 src/pages/nft/NFTPlaceholder.tsx
  125. +68 −153 src/pages/stake/QuickStake.tsx
  126. +0 −1 src/pages/stake/QuickStakeTooltip.tsx
  127. +7 −1 src/pages/stake/Stake.tsx
  128. +7 −3 src/pages/stake/Staked.tsx
  129. +6 −9 src/pages/stake/StakedDonut.tsx
  130. +17 −18 src/pages/stake/StakingDetailsCompact.tsx
  131. +9 −8 src/pages/stake/ValidatorActions.tsx
  132. +11 −36 src/pages/stake/Validators.tsx
  133. +22 −0 src/pages/stake/components/AllianceHubStakeCTA.module.scss
  134. +58 −0 src/pages/stake/components/AllianceHubStakeCTA.tsx
  135. +13 −10 src/pages/stake/components/StakedCard.tsx
  136. +93 −74 src/pages/stake/delegations/ChainDelegations.tsx
  137. +96 −70 src/pages/stake/delegations/Delegations.tsx
  138. +58 −0 src/pages/stake/hooks/useQuickStake.tsx
  139. +93 −101 src/pages/stake/rewards/ChainRewards.tsx
  140. +0 −101 src/pages/stake/rewards/Rewards.tsx
  141. +9 −10 src/pages/stake/unbondings/ChainUnbondings.tsx
  142. +9 −6 src/pages/stake/unbondings/Unbondings.tsx
  143. +9 −17 src/pages/wallet/Asset.tsx
  144. +1 −1 src/pages/wallet/AssetActions.tsx
  145. +36 −20 src/pages/wallet/AssetChain.tsx
  146. +53 −26 src/pages/wallet/AssetList.tsx
  147. +1 −0 src/pages/wallet/AssetPage.module.scss
  148. +50 −18 src/pages/wallet/AssetPage.tsx
  149. +2 −2 src/pages/wallet/CopyTokenAddress.tsx
  150. +1 −1 src/pages/wallet/FiatRampModal.tsx
  151. +21 −10 src/pages/wallet/IbcSendBackTx.tsx
  152. +25 −17 src/pages/wallet/NetWorth.tsx
  153. +0 −91 src/pages/wallet/Rewards.tsx
  154. +46 −28 src/pages/wallet/SendPage.tsx
  155. +13 −7 src/pages/wallet/TransferPage.tsx
  156. +10 −7 src/pages/wallet/Vesting.tsx
  157. +1 −1 src/pages/wallet/Wallet.module.scss
  158. +10 −0 src/styles/_customize.scss
  159. +49 −75 src/txs/Tx.tsx
  160. +10 −5 src/txs/gov/DepositForm.tsx
  161. +48 −35 src/txs/gov/SubmitProposalForm.tsx
  162. +143 −51 src/txs/stake/QuickStakeForm.tsx
  163. +29 −17 src/txs/stake/StakeForm.tsx
  164. +21 −21 src/txs/stake/StakeTx.tsx
  165. +6 −4 src/txs/stake/WithdrawRewards.tsx
  166. +120 −60 src/txs/stake/WithdrawRewardsForm.tsx
  167. +8 −5 src/txs/stake/WithdrawRewardsTx.tsx
  168. +2 −2 src/txs/swap/SingleSwapContext.tsx
  169. +32 −1 src/txs/swap/SwapTx.tsx
  170. +3 −3 src/txs/swap/TFMExpectedPrice.tsx
  171. +6 −5 src/txs/swap/TFMSwapContext.tsx
  172. +25 −9 src/txs/swap/TFMSwapForm.tsx
  173. +8 −1 src/txs/swap/components/AssetFormItem.tsx
  174. +5 −9 src/txs/swap/components/ExpectedPrice.tsx
  175. +4 −4 src/txs/swap/components/Price.tsx
  176. +3 −1 src/txs/swap/components/SelectToken.tsx
  177. +7 −1 src/txs/swap/components/SlippageControl.tsx
  178. +3 −3 src/txs/swap/useSwapUtils.ts
  179. +44 −0 src/txs/utils.ts
  180. +3 −5 src/txs/validate.ts
  181. +1 −0 src/txs/wasm/ExecuteContractForm.tsx
  182. +2 −0 src/txs/wasm/InstantiateContractForm.tsx
  183. +1 −0 src/txs/wasm/MigrateContractForm.tsx
  184. +4 −0 src/types/chains.ts
  185. +25 −5 src/types/network.d.ts
  186. +1 −0 src/types/token.d.ts
  187. +11 −0 src/utils/analytics/index.ts
  188. +39 −0 src/utils/analytics/setupAmplitude.ts
  189. 0 src/utils/{sentry → analytics}/setupSentry.ts
  190. +1 −1 src/utils/bech32.ts
  191. +4 −2 src/utils/chain.ts
  192. +4 −2 src/utils/coin.ts
  193. +10 −0 src/utils/ledger.ts
  194. +1 −0 src/utils/localStorage/keys.ts
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Dockerfile
docker-compose.yml
build/
node_modules/
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
SASS_PATH=node_modules:src/styles
# Docker Compose
COMPOSE_PROJECT_NAME=localterra
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -22,4 +22,7 @@ yarn-error.log*

.prettierrc

.vscode
.vscode

# commit hash used for update detection
public/commit_hash
59 changes: 59 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
FROM node:16 as builder

WORKDIR /app

RUN set -eux &&\
apt update &&\
apt install -y \
libudev-dev \
libusb-1.0-0-dev

COPY package*.json ./
COPY tsconfig.json ./

RUN set -eux && \
npm install -g typescript react-scripts && \
npm install --include=dev

COPY . .

ARG REACT_APP_ASSETS="https://assets.terra.dev" \
REACT_APP_STATION_ASSETS="https://station-assets.terra.dev"

ENV REACT_APP_ASSETS=${REACT_APP_ASSETS} \
REACT_APP_STATION_ASSETS=${REACT_APP_STATION_ASSETS}

RUN set -eux && \
npm run build --openssl-legacy-provider

###############################################################################

FROM node:16 as reloader

ARG REACT_APP_ASSETS="https://assets.terra.dev" \
REACT_APP_STATION_ASSETS="https://station-assets.terra.dev"

ENV REACT_APP_ASSETS=${REACT_APP_ASSETS} \
REACT_APP_STATION_ASSETS=${REACT_APP_STATION_ASSETS}

# add node modules to parent directory
COPY --from=builder /app/node_modules /app/node_modules
ENV PATH=/app/node_modules/.bin:$PATH

# use bind mount to enable hot reloading
WORKDIR /app/src
COPY . .

CMD ["npm", "run", "start"]

###############################################################################

FROM node:16-alpine

WORKDIR /app
COPY --from=builder /app/build .

RUN set -eux && \
npm install -g serve

CMD ["serve", "-s", "."]
44 changes: 44 additions & 0 deletions docker-assets/haproxy.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
global
log stdout format raw daemon debug
#chroot /var/lib/haproxy
#stats socket /var/run/haproxy.sock mode 660 level admin expose-fd listeners
#stats timeout 30s
user haproxy
group haproxy
daemon

defaults
log global
mode http
option httplog
option dontlognull
option forwardfor
option http-server-close
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000

frontend stats
bind *:8444
stats enable
stats uri /
stats refresh 10s

frontend localterra
bind *:1317
http-response set-header Access-Control-Allow-Origin *
http-response set-header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
http-response set-header Access-Control-Allow-Headers "*"
http-response set-header Access-Control-Max-Age 3600
default_backend localterra_lcd_backend

backend localterra_lcd_backend
mode http
server localterra_lcd localterra:1317
66 changes: 66 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
version: '3.9'

###############################################################################
services:

haproxy:
image: haproxy:2.8.0-alpine
volumes:
- ./docker-assets/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
networks:
- default
ports:
- '1317:1317'
- '8444:8444'

localterra:
image: ghcr.io/terra-money/localterra:${TERRA_VERSION:-latest}
platform: linux/amd64
hostname: terrad
volumes:
- terra:/app
networks:
- default

assets:
image: ghcr.io/terra-money/station-assets:1.0.1
hostname: assets
networks:
- default
ports:
- '3001:3001'

station:
build:
context: ./
dockerfile: Dockerfile
target: reloader
args:
REACT_APP_ASSETS: http://localhost:3001
REACT_APP_STATION_ASSETS: http://localhost:3001
image: ghcr.io/terra-money/station:localhr
networks:
- default
ports:
- '3000:3000'
# To enable/disable hot reload in station
# comment/uncomment the build `target` above and
# comment/uncomment the following lines below
command: >
/bin/sh -c "
echo 'Development server will take 2-3min to start up.' && \
exec npm run start"
environment:
NODE_ENV: "development"
HTTPS: "false"
volumes:
- ./:/app/dev
- /app/dev/node_modules

###############################################################################

volumes:
terra:

networks:
default:
Loading