Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

@drizzle/store new version of redux-saga #29

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

MrRefactoring
Copy link
Contributor

You can see new features and fixes in changelog

@adrianmcli adrianmcli self-requested a review September 26, 2019 14:44
@adrianmcli
Copy link
Contributor

This just needs testing, it's on my list of things to do. Thanks @MrRefactoring.

@0xTimepunk
Copy link

Can this be merged? What is holding this update?

@adrianmcli
Copy link
Contributor

adrianmcli commented Nov 27, 2019

Ahh this fell by the wayside, apologies to @MrRefactoring. I just ran tests on it and it seems like the tests are failing with a few tests complaining that .toPromise() is not a function:

TypeError: (0 , _reduxSaga.runSaga)(...).toPromise is not a function

@MrRefactoring do you think you can fix these?

Log:

@drizzle/store: FAIL test/web3.test.js
@drizzle/store:   ● Resolving Web3 › with ethereum, EIP-1102 compliance › loads when user opts in
@drizzle/store:     TypeError: (0 , _reduxSaga.runSaga)(...).toPromise is not a function
@drizzle/store:       64 |         dispatch: (action) => dispatched.push(action),
@drizzle/store:       65 |         getState: () => ({ state: 'test' })
@drizzle/store:     > 66 |       }, initializeWeb3, {}).toPromise()
@drizzle/store:          |                              ^
@drizzle/store:       67 |
@drizzle/store:       68 |       // result should be a proper web3 provider
@drizzle/store:       69 |       expect(result).toBeInstanceOf(require('web3'))
@drizzle/store:       at toPromise (test/web3.test.js:66:30)
@drizzle/store:       at tryCatch (../../node_modules/regenerator-runtime/runtime.js:45:40)
@drizzle/store:       at Generator.invoke [as _invoke] (../../node_modules/regenerator-runtime/runtime.js:271:22)
@drizzle/store:       at Generator.prototype.(anonymous function) [as next] (../../node_modules/regenerator-runtime/runtime.js:97:21)
@drizzle/store:       at asyncGeneratorStep (../../node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
@drizzle/store:       at _next (../../node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
@drizzle/store:       at ../../node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
@drizzle/store:       at Object.<anonymous> (../../node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12)
@drizzle/store:   ● Resolving Web3 › with ethereum, EIP-1102 compliance › does not load when user opts out
@drizzle/store:     TypeError: (0 , _reduxSaga.runSaga)(...).toPromise is not a function
@drizzle/store:       82 |         initializeWeb3,
@drizzle/store:       83 |         {}
@drizzle/store:     > 84 |       ).toPromise()
@drizzle/store:          |         ^
@drizzle/store:       85 |
@drizzle/store:       86 |       // saga result should be undefined if an exception occurs
@drizzle/store:       87 |       expect(web3Result).toBe(undefined)
@drizzle/store:       at toPromise (test/web3.test.js:84:9)
@drizzle/store:       at tryCatch (../../node_modules/regenerator-runtime/runtime.js:45:40)
@drizzle/store:       at Generator.invoke [as _invoke] (../../node_modules/regenerator-runtime/runtime.js:271:22)
@drizzle/store:       at Generator.prototype.(anonymous function) [as next] (../../node_modules/regenerator-runtime/runtime.js:97:21)
@drizzle/store:       at asyncGeneratorStep (../../node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
@drizzle/store:       at _next (../../node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
@drizzle/store:       at ../../node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
@drizzle/store:       at Object.<anonymous> (../../node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12)
@drizzle/store:   ● Resolving Web3 › with ethereum, EIP-1102 compliance › does not load when provider throws an error
@drizzle/store:     TypeError: (0 , _reduxSaga.runSaga)(...).toPromise is not a function
@drizzle/store:       101 |         dispatch: (action) => dispatched.push(action),
@drizzle/store:       102 |         getState: () => ({ state: 'test' })
@drizzle/store:     > 103 |       }, initializeWeb3, {}).toPromise()
@drizzle/store:           |                              ^
@drizzle/store:       104 |
@drizzle/store:       105 |       // saga result is undefined when exception is thrown
@drizzle/store:       106 |       expect(result).toBe(undefined)
@drizzle/store:       at toPromise (test/web3.test.js:103:30)
@drizzle/store:       at tryCatch (../../node_modules/regenerator-runtime/runtime.js:45:40)
@drizzle/store:       at Generator.invoke [as _invoke] (../../node_modules/regenerator-runtime/runtime.js:271:22)
@drizzle/store:       at Generator.prototype.(anonymous function) [as next] (../../node_modules/regenerator-runtime/runtime.js:97:21)
@drizzle/store:       at asyncGeneratorStep (../../node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
@drizzle/store:       at _next (../../node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
@drizzle/store:       at ../../node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
@drizzle/store:       at Object.<anonymous> (../../node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12)

@MrRefactoring
Copy link
Contributor Author

@adrianmcli sorry cannot reproduce.

My log today:

 FAIL  test/drizzle/middleware.test.js
  ● Test suite failed to run

    Cannot find module 'scrypt'

      at Object.<anonymous> (../../node_modules/ganache-core/node_modules/scrypt.js/node.js:1:14)

 FAIL  test/drizzle/api.test.js
  ● Test suite failed to run

    Cannot find module 'scrypt'

      at Object.<anonymous> (../../node_modules/ganache-core/node_modules/scrypt.js/node.js:1:14)

 FAIL  test/web3.test.js
  ● Test suite failed to run

    Cannot find module 'scrypt'

      at Object.<anonymous> (../../node_modules/ganache-core/node_modules/scrypt.js/node.js:1:14)

 FAIL  test/contractStateUtils.test.js
  ● Test suite failed to run

    Cannot find module 'scrypt'

      at Object.<anonymous> (../../node_modules/ganache-core/node_modules/scrypt.js/node.js:1:14)

 FAIL  test/accountBalances.test.js
  ● Test suite failed to run

    Cannot find module 'scrypt'

      at Object.<anonymous> (../../node_modules/ganache-core/node_modules/scrypt.js/node.js:1:14)

 FAIL  test/drizzle/getOrCreateWeb3.test.js
  ● Test suite failed to run

    Cannot find module 'scrypt'

      at Object.<anonymous> (../../node_modules/ganache-core/node_modules/scrypt.js/node.js:1:14)

 FAIL  test/accounts.test.js
  ● Test suite failed to run

    Cannot find module 'scrypt'

      at Object.<anonymous> (../../node_modules/ganache-core/node_modules/scrypt.js/node.js:1:14)

 FAIL  test/drizzle/options.test.js
  ● Test suite failed to run

    Cannot find module 'scrypt'

      at Object.<anonymous> (../../node_modules/ganache-core/node_modules/scrypt.js/node.js:1:14)

 FAIL  test/generateStore.test.js
  ● Test suite failed to run

    Cannot find module 'scrypt'

      at Object.<anonymous> (../../node_modules/ganache-core/node_modules/scrypt.js/node.js:1:14)

 FAIL  test/blocks.test.js
  ● Test suite failed to run

    Cannot find module 'scrypt'

      at Object.<anonymous> (../../node_modules/ganache-core/node_modules/scrypt.js/node.js:1:14)

Test Suites: 10 failed, 10 total
Tests:       0 total
Snapshots:   0 total
Time:        4.093s

@MrRefactoring
Copy link
Contributor Author

@adrianmcli I update yarn.lock and all tests passing. Can you check the tests again?

@0xTimepunk
Copy link

Checking in here again @adrianmcli @MrRefactoring :)

Much appreciated to have this merged soon.

@ghost
Copy link

ghost commented Oct 24, 2020

Hello, what is the status on this?
Without redux-saga 1.01 I can't integrate drizzle into my store, and I can't integrate my store into drizzle's store, due to redux-saga version mismatch errors.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants