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

[Wallet] Fix notifications #1637

Merged
merged 3 commits into from
Nov 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion packages/mobile/src/app/__snapshots__/Debug.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ exports[`Debug renders correctly 1`] = `
}
}
>
Address: 0x0000000000000000000000000000000000007E57
Address: 0x0000000000000000000000000000000000007e57
</Text>
<Text
style={
Expand Down
7 changes: 6 additions & 1 deletion packages/mobile/src/firebase/saga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,12 @@ function* subscribeToPaymentRequests() {
function* updatePaymentRequestStatus({ id, status }: UpdatePaymentRequestStatusAction) {
try {
Logger.debug(TAG, 'Updating payment request', id, status)
yield call(firebase.database().ref(`${REQUEST_DB}/${id}`).update, { status })
yield call(() =>
firebase
.database()
.ref(`${REQUEST_DB}/${id}`)
.update({ status })
)
Logger.debug(TAG, 'Payment request status updated', id)
} catch (error) {
Logger.error(TAG, `Error while updating payment request ${id} status`, error)
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/mobile/src/web3/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const reducer = (
case Actions.SET_ACCOUNT:
return {
...state,
account: action.address,
account: action.address.toLowerCase(),
}
case Actions.SET_ACCOUNT_IN_WEB3_KEYSTORE:
return {
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/src/web3/saga.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe(getOrCreateAccount, () => {
.withState(state)
.provide([[select(currentAccountSelector), null]])
.provide([[select(pincodeTypeSelector), '123']])
.returns('0x0000000000000000000000000000000000007E57')
.returns('0x0000000000000000000000000000000000007e57')
.run()
})
})
Expand Down
3 changes: 2 additions & 1 deletion packages/mobile/src/web3/selectors.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { RootState } from 'src/redux/reducers'

export const currentAccountSelector = (state: RootState) => state.web3.account
export const currentAccountSelector = (state: RootState) =>
(state.web3.account && state.web3.account.toLowerCase()) || null
export const currentAccountInWeb3KeystoreSelector = (state: RootState) =>
state.web3.accountInWeb3Keystore
export const zeroSyncSelector = (state: RootState) => state.web3.zeroSyncMode
Expand Down