Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/vesting UI #1132

Merged
merged 29 commits into from
Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
fc16d1c
add QA to network selector (temporary)
fmtabbara Feb 9, 2022
2612cca
refactoring
fmtabbara Feb 9, 2022
a72264c
get and display token allocation values
fmtabbara Feb 9, 2022
15bbba5
minor refactors
fmtabbara Feb 9, 2022
bdace0f
truncate address
fmtabbara Feb 9, 2022
22407c2
create address component
fmtabbara Feb 9, 2022
172399f
unlock spendable tokens
fmtabbara Feb 9, 2022
492f1dd
add notifications
fmtabbara Feb 10, 2022
7534892
close snackbars on component unmount
fmtabbara Feb 11, 2022
c03a58a
change file ext
Feb 14, 2022
a882d10
Merge branch 'develop' into feature/vesting-ui
Feb 14, 2022
0cdb68b
fix breaking changes + add vesting total period
Feb 14, 2022
0012294
add current vesting period
fmtabbara Feb 14, 2022
4d9dfac
[ci skip] Generate TS types
fmtabbara Feb 14, 2022
0ac7bb5
terminology updates
fmtabbara Feb 15, 2022
a2e6785
Merge branch 'feature/vesting-ui' of https://github.com/nymtech/nym i…
fmtabbara Feb 15, 2022
28d5ac9
fix alignment
fmtabbara Feb 15, 2022
22d4c89
display total vesting
fmtabbara Feb 15, 2022
5dee6dd
layout updates
fmtabbara Feb 18, 2022
b386388
reorganise vesting ui
fmtabbara Feb 24, 2022
3b85927
merge develop
fmtabbara Feb 24, 2022
15d612e
add fee
fmtabbara Feb 24, 2022
7ca92cc
hide vesting card if no vesting period created
fmtabbara Feb 24, 2022
fb4b323
log error
fmtabbara Feb 24, 2022
cceb7a4
update contract addressess
fmtabbara Feb 24, 2022
29b07b4
sort out car alignment!
fmtabbara Feb 24, 2022
aab2be1
only allow QA network selection in development mode
fmtabbara Feb 25, 2022
9533c24
clear all balanced on logout
fmtabbara Feb 25, 2022
39fb131
minor updates
fmtabbara Feb 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
only allow QA network selection in development mode
  • Loading branch information
fmtabbara committed Feb 25, 2022
commit aab2be1fbd5b054e8d8612c517501bdaf35c0472
1 change: 1 addition & 0 deletions nym-wallet/config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export const config = {
ADMIN_ADDRESS: process.env.ADMIN_ADDRESS,
IS_DEV_MODE: process.env.NODE_ENV === 'development',
}
26 changes: 14 additions & 12 deletions nym-wallet/src/components/NetworkSelector.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useContext } from 'react'
import { Button, List, ListItem, ListItemIcon, ListItemText, ListSubheader, Popover } from '@mui/material'
import { ArrowDropDown, CheckSharp } from '@mui/icons-material'
import { ClientContext } from '../context/main'
import { ClientContext, IS_DEV_MODE } from '../context/main'
import { Network } from 'src/types'

const networks: { networkName: Network; name: string }[] = [
Expand Down Expand Up @@ -46,17 +46,19 @@ export const NetworkSelector = () => {
>
<List>
<ListSubheader>Network selection</ListSubheader>
{networks.map(({ name, networkName }) => (
<NetworkItem
key={networkName}
title={name}
isSelected={networkName === network}
onSelect={() => {
handleClose()
switchNetwork(networkName)
}}
/>
))}
{networks
.filter((network) => !(!IS_DEV_MODE && network.networkName === 'QA'))
.map(({ name, networkName }) => (
<NetworkItem
key={networkName}
title={name}
isSelected={networkName === network}
onSelect={() => {
handleClose()
switchNetwork(networkName)
}}
/>
))}
</List>
</Popover>
</>
Expand Down
4 changes: 2 additions & 2 deletions nym-wallet/src/context/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { getMixnodeBondDetails, selectNetwork, signInWithMnemonic, signOut } fro
import { currencyMap } from '../utils'
import { useHistory } from 'react-router-dom'

export const { ADMIN_ADDRESS } = config
export const { ADMIN_ADDRESS, IS_DEV_MODE } = config

export const urls = (network?: Network) =>
network === 'MAINNET'
Expand Down Expand Up @@ -70,7 +70,7 @@ export const ClientContextProvider = ({ children }: { children: React.ReactNode
setIsLoading(true)
await signInWithMnemonic(mnemonic || '')
await getBondDetails()
setNetwork('QA')
setNetwork('MAINNET')
history.push('/balance')
} catch (e) {
setIsLoading(false)
Expand Down