Save receive address in localStorage to prevent new receive address creation on
every boot
This commit is contained in:
parent
58c06e17c9
commit
e08419e534
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
import * as types from 'constants/action_types'
|
||||
|
||||
const reducers = {}
|
||||
const address = sessionStorage.getItem('receiveAddress')
|
||||
const address = localStorage.getItem('receiveAddress')
|
||||
const buildDraftTransaction = () => ({
|
||||
amount: undefined,
|
||||
address: undefined
|
||||
|
@ -50,7 +50,7 @@ reducers[types.GET_NEW_ADDRESS_STARTED] = function(state, action) {
|
|||
reducers[types.GET_NEW_ADDRESS_COMPLETED] = function(state, action) {
|
||||
const { address } = action.data
|
||||
|
||||
sessionStorage.setItem('receiveAddress', address)
|
||||
localStorage.setItem('receiveAddress', address)
|
||||
return Object.assign({}, state, {
|
||||
gettingNewAddress: false,
|
||||
receiveAddress: address
|
||||
|
|
Loading…
Reference in a new issue