Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/CityOfZion/neon-wallet into …
Browse files Browse the repository at this point in the history
…refactor-sendassetfn
  • Loading branch information
dvdschwrtz committed Dec 9, 2017
2 parents bc87a33 + 430eaf9 commit ca79c3c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 21 deletions.
10 changes: 2 additions & 8 deletions __tests__/components/WalletInfo.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe('WalletInfo', () => {
await Promise.resolve('Pause').then().then().then()
jest.runAllTimers()
const actions = store.getActions()
expect(actions.length).toEqual(6)
expect(actions.length).toEqual(5)

expect(actions[0]).toEqual({
type: LOADING_TRANSACTIONS,
Expand All @@ -147,12 +147,6 @@ describe('WalletInfo', () => {
}
})
expect(actions[4]).toEqual({
type: SET_IS_LOADED,
payload: {
loaded: true
}
})
expect(actions[5]).toEqual({
type: SET_BALANCE,
payload: {
NEO: 1,
Expand Down Expand Up @@ -216,4 +210,4 @@ describe('WalletInfo', () => {
// let's make sure the last notification show was an error.
expect(notifications.pop().payload.level).toEqual('error')
})
})
})
2 changes: 1 addition & 1 deletion app/components/Modals/ReceiveModal/ReceiveModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ReceiveModal extends Component<Props> {
style={{
content: {
width: '420px',
height: '420px'
height: '460px'
}
}}
>
Expand Down
14 changes: 3 additions & 11 deletions app/containers/Settings/Settings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,6 @@ export default class Settings extends Component<Props, State> {
})
}

getCurrencyOptions () {
var options = []

Object.keys(CURRENCIES).forEach(function (currencyCode) {
options.push(<option value={currencyCode} key={currencyCode}>{currencyCode.toUpperCase()}</option>)
})

return options
}

render () {
const { wallets, explorer, currency } = this.props

Expand All @@ -146,7 +136,9 @@ export default class Settings extends Component<Props, State> {
<div className='settingsItem'>
<div className='itemTitle'>Currency</div>
<select value={currency} onChange={this.updateCurrencySettings}>
{this.getCurrencyOptions()}
{Object.keys(CURRENCIES).map((currencyCode: string) =>
<option value={currencyCode} key={currencyCode}>{currencyCode.toUpperCase()}</option>
)}
</select>
</div>
<div className='settingsItem'>
Expand Down
2 changes: 1 addition & 1 deletion app/modules/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export function setTokens (tokens: Object) {
export const retrieveBalance = (net: NetworkType, address: string) => async (dispatch: DispatchType) => {
// If API dies, still display balance - ignore _err
const [_err, resultBalance] = await asyncWrap(api.neonDB.getBalance(net, address)) // eslint-disable-line
dispatch(setIsLoaded(true))
if (_err) {
return dispatch(showErrorNotification({ message: `Could not retrieve NEO/GAS balance`, stack: true }))
} else {
Expand All @@ -87,6 +86,7 @@ export const loadWalletData = (silent: boolean = true) => async (dispatch: Dispa
dispatch(retrieveTokensBalance()),
dispatch(retrieveBalance(net, address))
])
dispatch(setIsLoaded(true))
return true
}

Expand Down

0 comments on commit ca79c3c

Please sign in to comment.