Skip to content

Commit

Permalink
IS Sprint 22 - 7.3.1 (#476)
Browse files Browse the repository at this point in the history
* fix: property undefined chainID error
* fix: convert object error
* fixed wallet popover overlapping on top of Send and Recieve title ST-475 (#436)
* fix: add scroll to chainlist container (#437)
* feat: filter out non-whitelisted tokens (#439)
* feat: disable send if wallet is empty (#438)
* feat: disable send if wallet is empty
* Co-authored-by: Manuel Alessandro Collazo <[email protected]>

* feat: lunc display
* feat: introduce amplitude (#440)
* feat: introduce amplitude
* feat: fix denom ibc in staking assets dropdown (#448)
* feat: fix denom ibc in staking assets dropdown
* feat: fix denom ibc in staking assets dropdown 2
* revert: denom undefined default value
* fix: add spacing

---------

Co-authored-by: Manuel Alessandro Collazo <[email protected]>

* St 565 val page staking rewards (#447)

* feat: fix val page staking rewards

* Fix scenario whereby proposal with empty description result in error

* Show disabled network name and icon (#454)

* ST-492: wallet-kit integration (#418)

* Use new IBC channels (#453)

* Improve LUNC/LUNA IBC detection (#456)

* fix ibc lunc

* fix readNativeDenom()

* fix undefined chainID

* Use chainID to map unknownIBCDenoms

* fix ts error

* feat: chain dependent staking functionality (#450)

* wip: neutron chain integation

* wip: use network by chain feature

* feat: chain dependent staking functionality

* chore: revert local url

* chore: remove unused imports

* feat: St 543 implement amplitude (#455)

* wip: amplitude tracking revisions

* feat: amplitude setup and tx event track

* fix: add versioning to amplitude client

* chore: fix versioning

* fix: price calculation

Fixing issue with being unable to click withdraw rewards when there are rewards available.

* chore: update package-lock.json

* fix ibc token denoms (#460)

* FIX: swap Read component (#461)

* fix swap Read component

* show 0 if integer is undefined

* show % if there are no decimals

* fix: undefined prices

`ncheq` not available in price list.  Protect against denoms not being available in memoizedPrices.

* Fix ICS20 send back

* fix ICS20 denom calculation

* fix kujira factory IBC tokens (#466)

* fix kujira factory IBC tokens

* fix send back and use prefix to detect kujira

* feat: validate amount inputs (#465)

* feat: validate number fields in amount inputs

* fix: hide input spin button

* fix: unintended form validation

* chore: rem kado buy button (#467)

* chore: rem rewards weight from stake table (#468)

* chore: rem rewards weight from stake table

* fix: rem rewards rate from 2 other places

* chore: added more spacing on the Quick Stake table

---------

Co-authored-by: Joshua <[email protected]>

* fix: pass decimals in fee estimation (#471)

* St 619 localterra fix (#469)

* localterra setup

* improve hot reload speed, add env vars in constants

* update preconfigured wallets

* update package.json scripts

* Update preconfigured.json

* fix merge

* add network scan to localterra

* restore src/config/preconfigured.json orig state

* chore(deps): bump semver from 7.3.7 to 7.5.2 (#444)

Bumps [semver](https://github.com/npm/node-semver) from 7.3.7 to 7.5.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](npm/node-semver@v7.3.7...v7.5.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump tough-cookie from 4.0.0 to 4.1.3 (#462)

Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.0.0 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](salesforce/tough-cookie@v4.0.0...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 (#474)

* chore(deps-dev): bump word-wrap from 1.2.3 to 1.2.4

Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Mike <[email protected]>

* fix: allow decimals in swap (#477)
* St 505 fix history pagination with cosmos sdk 46 (#475)
* wip: use new pagination keys for terra only.
* feat: lower history limit to 75
* Revert "chore: rem kado buy button (#467)"

This reverts commit db138e5.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Manuel Alessandro Collazo <[email protected]>
Co-authored-by: Joshua Brigati <[email protected]>
Co-authored-by: plubber <[email protected]>
Co-authored-by: Terence Lim <[email protected]>
Co-authored-by: Alessandro Candeago <[email protected]>
Co-authored-by: Joshua <[email protected]>
Co-authored-by: Greg Junge <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
9 people authored Jul 25, 2023
1 parent 492568b commit ff63a3a
Show file tree
Hide file tree
Showing 31 changed files with 302 additions and 116 deletions.
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/
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
SASS_PATH=node_modules:src/styles

# Docker Compose
COMPOSE_PROJECT_NAME=localterra
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.money" \
REACT_APP_STATION_ASSETS="https://station-assets.terra.money"

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.money" \
REACT_APP_STATION_ASSETS="https://station-assets.terra.money"

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:
56 changes: 29 additions & 27 deletions package-lock.json

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

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
"test": "react-scripts test",
"prepare": "husky install",
"pre-commit": "lint-staged",
"analyze": "source-map-explorer 'build/static/js/*.js'"
"analyze": "source-map-explorer 'build/static/js/*.js'",
"dc:up": "docker-compose up --build -d",
"dc:logs": "docker-compose logs -f",
"dc:down": "docker-compose down",
"dc:purge": "docker compose rm -f -s -v && docker volume rm localterra_terra"
},
"dependencies": {
"@amplitude/analytics-browser": "^2.0.0",
Expand Down Expand Up @@ -59,7 +63,7 @@
"recoil": "^0.7.2",
"sass": "^1.52.1",
"secp256k1": "^4.0.3",
"semver": "^7.3.7",
"semver": "^7.5.2",
"sentence-case": "^3.0.4",
"xss": "1.0.11"
},
Expand Down
1 change: 1 addition & 0 deletions src/app/InitNetworks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const InitNetworks = ({ children }: PropsWithChildren<{}>) => {
...networks.mainnet,
...networks.testnet,
...networks.classic,
...networks.localterra,
} ?? {}
).map((chain) => {
const lcd = customLCDs[chain?.chainID] ?? chain.lcd
Expand Down
1 change: 1 addition & 0 deletions src/components/form/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const Input = forwardRef(
before: token || actionButton,
after: selectBefore,
})}
step="any"
autoComplete="off"
ref={ref}
/>
Expand Down
8 changes: 8 additions & 0 deletions src/components/layout/Table.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,11 @@
border-top: 0px solid var(--card-border);
}
}

.actions {
padding-left: 100px !important;

@media (max-width: 1550px) and (min-width: 1420px) {
padding-left: 50px !important;
}
}
2 changes: 1 addition & 1 deletion src/components/layout/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function Table<T>({ dataSource, filter, rowKey, ...props }: Props<T>) {
const columns = props.columns.filter(({ hidden }) => !hidden)

/* helpers */
const getClassName = ({ align }: Column<T>) => cx(align)
const getClassName = ({ align, dataIndex }: Column<T>) => cx(align, dataIndex)

/* pagination */
const [page, setPage] = useState(1)
Expand Down
7 changes: 5 additions & 2 deletions src/config/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ export const LAZY_LIMIT = 999
export const BRIDGE = "https://walletconnect.terra.dev"

/* api */
export const ASSETS = "https://assets.terra.money"
export const STATION_ASSETS = "https://station-assets.terra.money"
export const ASSETS =
process.env.REACT_APP_ASSETS ?? "https://assets.terra.money"
export const STATION_ASSETS =
process.env.REACT_APP_STATION_ASSETS ?? "https://station-assets.terra.money"

export const OBSERVER = "wss://observer.terra.dev"

/* website */
Expand Down
Loading

0 comments on commit ff63a3a

Please sign in to comment.