Skip to content

Commit

Permalink
chore: update decentraland-dapps (#168)
Browse files Browse the repository at this point in the history
* chore: update decentraland-dapps

* chore: update version
  • Loading branch information
cazala authored Mar 26, 2020
1 parent 8b4b231 commit 15e5a6b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 27 deletions.
36 changes: 18 additions & 18 deletions webapp/package-lock.json

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

2 changes: 1 addition & 1 deletion webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"connected-react-router": "^6.6.1",
"date-fns": "^2.8.1",
"dcl-tslint-config-standard": "^2.0.0",
"decentraland-dapps": "^7.3.0",
"decentraland-dapps": "^7.4.0",
"decentraland-ui": "^2.16.1",
"dotenv": "^8.2.0",
"graphql": "^14.5.8",
Expand Down
20 changes: 12 additions & 8 deletions webapp/src/modules/wallet/sagas.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
import { takeEvery, all, put } from 'redux-saga/effects'
import { createWalletSaga } from 'decentraland-dapps/dist/modules/wallet/sagas'
import { walletSaga as baseWalletSaga } from 'decentraland-dapps/dist/modules/wallet/sagas'
import {
ConnectWalletSuccessAction,
CONNECT_WALLET_SUCCESS
CONNECT_WALLET_SUCCESS,
ChangeAccountAction,
ChangeNetworkAction,
CHANGE_ACCOUNT,
CHANGE_NETWORK
} from 'decentraland-dapps/dist/modules/wallet/actions'

import { fetchAuthorizationRequest } from '../authorization/actions'
import { AuthorizationsRequest } from '../authorization/types'
import { contractAddresses } from '../contract/utils'

const baseWalletSaga = createWalletSaga({
MANA_ADDRESS: contractAddresses.MANAToken
})

export function* walletSaga() {
yield all([baseWalletSaga(), fullWalletSaga()])
}

function* fullWalletSaga() {
yield takeEvery(CONNECT_WALLET_SUCCESS, handleConnectWalletSuccess)
yield takeEvery(CONNECT_WALLET_SUCCESS, handleWallet)
yield takeEvery(CHANGE_ACCOUNT, handleWallet)
yield takeEvery(CHANGE_NETWORK, handleWallet)
}

function* handleConnectWalletSuccess(action: ConnectWalletSuccessAction) {
function* handleWallet(
action: ConnectWalletSuccessAction | ChangeAccountAction | ChangeNetworkAction
) {
const { address } = action.payload.wallet

const {
Expand Down

0 comments on commit 15e5a6b

Please sign in to comment.