mirror of
https://github.com/status-im/dappconnect-voting-sdk.git
synced 2025-02-22 23:48:08 +00:00
s/@dappconnect/@waku/
This commit is contained in:
parent
eaa71c01fa
commit
293d43e939
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@dappconnect/vote-poll-sdk",
|
"name": "@waku/vote-poll-sdk",
|
||||||
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "MIT OR Apache-2.0",
|
"license": "MIT OR Apache-2.0",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@dappconnect/vote-sdk-contracts",
|
"name": "@waku/vote-sdk-contracts",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
||||||
|
@ -56,7 +56,7 @@ WakuVoting create function expects name of DApp and address of a voting contract
|
|||||||
Address of token is derived from votingContract
|
Address of token is derived from votingContract
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuVoting } from '@waku/vote-poll-sdk-core'
|
||||||
|
|
||||||
await WakuVoting.create(appName, contractAddress, provider, multicallAddress, waku)
|
await WakuVoting.create(appName, contractAddress, provider, multicallAddress, waku)
|
||||||
```
|
```
|
||||||
@ -148,7 +148,7 @@ To make it easier to use WakuPolling class was created
|
|||||||
WakuPolling create expects name of DApp and address of a token contract, web3provider, also as optional parameter can take custom Waku object.
|
WakuPolling create expects name of DApp and address of a token contract, web3provider, also as optional parameter can take custom Waku object.
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { WakuPolling } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuPolling } from '@waku/vote-poll-sdk-core'
|
||||||
|
|
||||||
await WakuPolling.create(appName, tokenAddress, provider, multicallAddress, waku)
|
await WakuPolling.create(appName, tokenAddress, provider, multicallAddress, waku)
|
||||||
```
|
```
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@dappconnect/vote-poll-sdk-core",
|
"name": "@waku/vote-poll-sdk-core",
|
||||||
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
||||||
"main": "dist/cjs/src/index.js",
|
"main": "dist/cjs/src/index.js",
|
||||||
"module": "dist/esm/src/index.js",
|
"module": "dist/esm/src/index.js",
|
||||||
@ -42,7 +42,7 @@
|
|||||||
"typescript": "^4.3.5"
|
"typescript": "^4.3.5"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dappconnect/vote-sdk-contracts": "^0.0.1",
|
"@waku/vote-sdk-contracts": "^0.0.1",
|
||||||
"eth-sig-util": "^3.0.1",
|
"eth-sig-util": "^3.0.1",
|
||||||
"ethers": "^5.4.4",
|
"ethers": "^5.4.4",
|
||||||
"js-waku": "^0.11.0",
|
"js-waku": "^0.11.0",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { VotingContract } from '@dappconnect/vote-sdk-contracts/abi'
|
import { VotingContract } from '@waku/vote-sdk-contracts/abi'
|
||||||
import { WakuMessaging } from './WakuMessaging'
|
import { WakuMessaging } from './WakuMessaging'
|
||||||
import { Contract, Wallet, BigNumber, ethers, utils } from 'ethers'
|
import { Contract, Wallet, BigNumber, ethers, utils } from 'ethers'
|
||||||
import { Waku, WakuMessage } from 'js-waku'
|
import { Waku, WakuMessage } from 'js-waku'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@dappconnect/vote-poll-sdk-example",
|
"name": "@waku/vote-poll-sdk-example",
|
||||||
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
@ -16,8 +16,8 @@
|
|||||||
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dappconnect/poll-sdk-example": "^0.1.0",
|
"@waku/poll-sdk-example": "^0.1.0",
|
||||||
"@dappconnect/vote-sdk-example": "^0.1.0",
|
"@waku/vote-sdk-example": "^0.1.0",
|
||||||
"assert": "^2.0.0",
|
"assert": "^2.0.0",
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^6.0.3",
|
||||||
"crypto-browserify": "^3.12.0",
|
"crypto-browserify": "^3.12.0",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom'
|
||||||
import { PollingPage } from '@dappconnect/poll-sdk-example'
|
import { PollingPage } from '@waku/poll-sdk-example'
|
||||||
import { VotingPage } from '@dappconnect/vote-sdk-example'
|
import { VotingPage } from '@waku/vote-sdk-example'
|
||||||
import { BrowserRouter } from 'react-router-dom'
|
import { BrowserRouter } from 'react-router-dom'
|
||||||
import { Route, Switch } from 'react-router'
|
import { Route, Switch } from 'react-router'
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@dappconnect/mainnet-poll-sdk-example",
|
"name": "@waku/mainnet-poll-sdk-example",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -15,10 +15,10 @@
|
|||||||
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dappconnect/vote-poll-sdk-core": "^0.1.0",
|
"@waku/vote-poll-sdk-core": "^0.1.0",
|
||||||
"@dappconnect/poll-sdk-react-components": "^0.1.0",
|
"@waku/poll-sdk-react-components": "^0.1.0",
|
||||||
"@dappconnect/poll-sdk-react-hooks": "^0.1.0",
|
"@waku/poll-sdk-react-hooks": "^0.1.0",
|
||||||
"@dappconnect/vote-poll-sdk-react-components": "^0.1.0",
|
"@waku/vote-poll-sdk-react-components": "^0.1.0",
|
||||||
"@usedapp/core": "^0.4.7",
|
"@usedapp/core": "^0.4.7",
|
||||||
"ethers": "^5.4.4",
|
"ethers": "^5.4.4",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
|
@ -2,11 +2,11 @@ import React, { useState, useEffect } from 'react'
|
|||||||
import { useConfig, useEthers } from '@usedapp/core'
|
import { useConfig, useEthers } from '@usedapp/core'
|
||||||
|
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { PollList, PollCreation } from '@dappconnect/poll-sdk-react-components'
|
import { PollList, PollCreation } from '@waku/poll-sdk-react-components'
|
||||||
import { JsonRpcSigner } from '@ethersproject/providers'
|
import { JsonRpcSigner } from '@ethersproject/providers'
|
||||||
import { useWakuPolling } from '@dappconnect/poll-sdk-react-hooks'
|
import { useWakuPolling } from '@waku/poll-sdk-react-hooks'
|
||||||
import { Modal, Networks, CreateButton } from '@dappconnect/vote-poll-sdk-react-components'
|
import { Modal, Networks, CreateButton } from '@waku/vote-poll-sdk-react-components'
|
||||||
import { Theme } from '@dappconnect/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
import { Theme } from '@waku/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
||||||
|
|
||||||
type WakuPollingProps = {
|
type WakuPollingProps = {
|
||||||
appName: string
|
appName: string
|
||||||
|
@ -3,10 +3,10 @@ import styled from 'styled-components'
|
|||||||
import { DAppProvider, ChainId, useEthers } from '@usedapp/core'
|
import { DAppProvider, ChainId, useEthers } from '@usedapp/core'
|
||||||
import { DEFAULT_CONFIG } from '@usedapp/core/dist/cjs/src/model/config/default'
|
import { DEFAULT_CONFIG } from '@usedapp/core/dist/cjs/src/model/config/default'
|
||||||
import { WakuPolling } from './components/WakuPolling'
|
import { WakuPolling } from './components/WakuPolling'
|
||||||
import { TopBar, GlobalStyle } from '@dappconnect/vote-poll-sdk-react-components'
|
import { TopBar, GlobalStyle } from '@waku/vote-poll-sdk-react-components'
|
||||||
import pollingIcon from './assets/images/pollingIcon.png'
|
import pollingIcon from './assets/images/pollingIcon.png'
|
||||||
import { JsonRpcSigner } from '@ethersproject/providers'
|
import { JsonRpcSigner } from '@ethersproject/providers'
|
||||||
import { orangeTheme } from '@dappconnect/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
import { orangeTheme } from '@waku/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom'
|
||||||
import { BrowserRouter } from 'react-router-dom'
|
import { BrowserRouter } from 'react-router-dom'
|
||||||
import { Route, Switch } from 'react-router'
|
import { Route, Switch } from 'react-router'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@dappconnect/poll-sdk-example",
|
"name": "@waku/poll-sdk-example",
|
||||||
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"main": "dist/cjs/src/index.js",
|
"main": "dist/cjs/src/index.js",
|
||||||
@ -31,10 +31,10 @@
|
|||||||
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dappconnect/vote-poll-sdk-core": "^0.1.0",
|
"@waku/vote-poll-sdk-core": "^0.1.0",
|
||||||
"@dappconnect/poll-sdk-react-components": "^0.1.0",
|
"@waku/poll-sdk-react-components": "^0.1.0",
|
||||||
"@dappconnect/poll-sdk-react-hooks": "^0.1.0",
|
"@waku/poll-sdk-react-hooks": "^0.1.0",
|
||||||
"@dappconnect/vote-poll-sdk-react-components": "^0.1.0",
|
"@waku/vote-poll-sdk-react-components": "^0.1.0",
|
||||||
"@usedapp/core": "^0.4.7",
|
"@usedapp/core": "^0.4.7",
|
||||||
"ethers": "^5.4.4",
|
"ethers": "^5.4.4",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
|
@ -2,11 +2,11 @@ import React, { useState, useEffect } from 'react'
|
|||||||
import { useConfig, useEthers } from '@usedapp/core'
|
import { useConfig, useEthers } from '@usedapp/core'
|
||||||
|
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { PollList, PollCreation } from '@dappconnect/poll-sdk-react-components'
|
import { PollList, PollCreation } from '@waku/poll-sdk-react-components'
|
||||||
import { JsonRpcSigner } from '@ethersproject/providers'
|
import { JsonRpcSigner } from '@ethersproject/providers'
|
||||||
import { useWakuPolling } from '@dappconnect/poll-sdk-react-hooks'
|
import { useWakuPolling } from '@waku/poll-sdk-react-hooks'
|
||||||
import { Modal, Networks, CreateButton } from '@dappconnect/vote-poll-sdk-react-components'
|
import { Modal, Networks, CreateButton } from '@waku/vote-poll-sdk-react-components'
|
||||||
import { Theme } from '@dappconnect/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
import { Theme } from '@waku/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
||||||
|
|
||||||
type WakuPollingProps = {
|
type WakuPollingProps = {
|
||||||
appName: string
|
appName: string
|
||||||
|
@ -3,10 +3,10 @@ import styled from 'styled-components'
|
|||||||
import { DAppProvider, ChainId, useEthers } from '@usedapp/core'
|
import { DAppProvider, ChainId, useEthers } from '@usedapp/core'
|
||||||
import { DEFAULT_CONFIG } from '@usedapp/core/dist/cjs/src/model/config/default'
|
import { DEFAULT_CONFIG } from '@usedapp/core/dist/cjs/src/model/config/default'
|
||||||
import { WakuPolling } from './components/WakuPolling'
|
import { WakuPolling } from './components/WakuPolling'
|
||||||
import { TopBar, GlobalStyle } from '@dappconnect/vote-poll-sdk-react-components'
|
import { TopBar, GlobalStyle } from '@waku/vote-poll-sdk-react-components'
|
||||||
import pollingIcon from './assets/images/pollingIcon.png'
|
import pollingIcon from './assets/images/pollingIcon.png'
|
||||||
import { JsonRpcSigner } from '@ethersproject/providers'
|
import { JsonRpcSigner } from '@ethersproject/providers'
|
||||||
import { orangeTheme } from '@dappconnect/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
import { orangeTheme } from '@waku/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
readOnlyChainId: ChainId.Ropsten,
|
readOnlyChainId: ChainId.Ropsten,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@dappconnect/poll-sdk-react-components",
|
"name": "@waku/poll-sdk-react-components",
|
||||||
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"main": "dist/cjs/src/index.js",
|
"main": "dist/cjs/src/index.js",
|
||||||
@ -33,9 +33,9 @@
|
|||||||
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dappconnect/vote-poll-sdk-core": "^0.1.0",
|
"@waku/vote-poll-sdk-core": "^0.1.0",
|
||||||
"@dappconnect/poll-sdk-react-hooks": "^0.1.0",
|
"@waku/poll-sdk-react-hooks": "^0.1.0",
|
||||||
"@dappconnect/vote-poll-sdk-react-components": "^0.1.0",
|
"@waku/vote-poll-sdk-react-components": "^0.1.0",
|
||||||
"ethers": "^5.4.4",
|
"ethers": "^5.4.4",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"styled-components": "^5.3.0"
|
"styled-components": "^5.3.0"
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { WakuPolling } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuPolling } from '@waku/vote-poll-sdk-core'
|
||||||
import { DetailedTimedPoll } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/models/DetailedTimedPoll'
|
import { DetailedTimedPoll } from '@waku/vote-poll-sdk-core/dist/esm/src/models/DetailedTimedPoll'
|
||||||
import { BigNumber } from 'ethers'
|
import { BigNumber } from 'ethers'
|
||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
import { PollType } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
import { PollType } from '@waku/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { RadioGroup, SmallButton, Theme } from '@dappconnect/vote-poll-sdk-react-components'
|
import { RadioGroup, SmallButton, Theme } from '@waku/vote-poll-sdk-react-components'
|
||||||
import { PollResults } from './PollResults'
|
import { PollResults } from './PollResults'
|
||||||
import { Modal } from '@dappconnect/vote-poll-sdk-react-components'
|
import { Modal } from '@waku/vote-poll-sdk-react-components'
|
||||||
|
|
||||||
type PollProps = {
|
type PollProps = {
|
||||||
theme: Theme
|
theme: Theme
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import React, { ReactNode, useState } from 'react'
|
import React, { ReactNode, useState } from 'react'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { PollType } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
import { PollType } from '@waku/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||||
import { WakuPolling } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuPolling } from '@waku/vote-poll-sdk-core'
|
||||||
import { Input, addIcon, SmallButton, Modal, Theme } from '@dappconnect/vote-poll-sdk-react-components'
|
import { Input, addIcon, SmallButton, Modal, Theme } from '@waku/vote-poll-sdk-react-components'
|
||||||
import { MESSAGE_SENDING_RESULT } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/classes/WakuPolling'
|
import { MESSAGE_SENDING_RESULT } from '@waku/vote-poll-sdk-core/dist/esm/src/classes/WakuPolling'
|
||||||
|
|
||||||
const defaultPollDuration = 7 * 24 * 60 * 60 * 1000 // One week in ms.
|
const defaultPollDuration = 7 * 24 * 60 * 60 * 1000 // One week in ms.
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { WakuPolling } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuPolling } from '@waku/vote-poll-sdk-core'
|
||||||
import { DetailedTimedPoll } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/models/DetailedTimedPoll'
|
import { DetailedTimedPoll } from '@waku/vote-poll-sdk-core/dist/esm/src/models/DetailedTimedPoll'
|
||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
import { Poll } from './Poll'
|
import { Poll } from './Poll'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { Theme } from '@dappconnect/vote-poll-sdk-react-components'
|
import { Theme } from '@waku/vote-poll-sdk-react-components'
|
||||||
import { usePollList } from '@dappconnect/poll-sdk-react-hooks'
|
import { usePollList } from '@waku/poll-sdk-react-hooks'
|
||||||
type PollListProps = {
|
type PollListProps = {
|
||||||
theme: Theme
|
theme: Theme
|
||||||
wakuPolling: WakuPolling | undefined
|
wakuPolling: WakuPolling | undefined
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { DetailedTimedPoll } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/models/DetailedTimedPoll'
|
import { DetailedTimedPoll } from '@waku/vote-poll-sdk-core/dist/esm/src/models/DetailedTimedPoll'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { colorRouletteGenerator, checkCircleIcon } from '@dappconnect/vote-poll-sdk-react-components'
|
import { colorRouletteGenerator, checkCircleIcon } from '@waku/vote-poll-sdk-react-components'
|
||||||
|
|
||||||
type PollResultsProps = {
|
type PollResultsProps = {
|
||||||
poll: DetailedTimedPoll
|
poll: DetailedTimedPoll
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@dappconnect/poll-sdk-react-hooks",
|
"name": "@waku/poll-sdk-react-hooks",
|
||||||
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"main": "dist/cjs/src/index.js",
|
"main": "dist/cjs/src/index.js",
|
||||||
@ -29,7 +29,7 @@
|
|||||||
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dappconnect/vote-poll-sdk-core": "^0.1.0",
|
"@waku/vote-poll-sdk-core": "^0.1.0",
|
||||||
"@usedapp/core": "^0.4.7",
|
"@usedapp/core": "^0.4.7",
|
||||||
"ethers": "^5.4.4",
|
"ethers": "^5.4.4",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { WakuPolling } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuPolling } from '@waku/vote-poll-sdk-core'
|
||||||
import { DetailedTimedPoll } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/models/DetailedTimedPoll'
|
import { DetailedTimedPoll } from '@waku/vote-poll-sdk-core/dist/esm/src/models/DetailedTimedPoll'
|
||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
|
|
||||||
export function usePollList(wakuPolling: WakuPolling | undefined) {
|
export function usePollList(wakuPolling: WakuPolling | undefined) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useState, useRef } from 'react'
|
import { useEffect, useState, useRef } from 'react'
|
||||||
import { WakuPolling } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuPolling } from '@waku/vote-poll-sdk-core'
|
||||||
import { Web3Provider } from '@ethersproject/providers'
|
import { Web3Provider } from '@ethersproject/providers'
|
||||||
|
|
||||||
export function useWakuPolling(
|
export function useWakuPolling(
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@dappconnect/vote-poll-sdk-react-components",
|
"name": "@waku/vote-poll-sdk-react-components",
|
||||||
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
||||||
"main": "dist/cjs/src/index.js",
|
"main": "dist/cjs/src/index.js",
|
||||||
"module": "dist/esm/src/index.js",
|
"module": "dist/esm/src/index.js",
|
||||||
@ -34,7 +34,7 @@
|
|||||||
"ethers": "^5.4.4",
|
"ethers": "^5.4.4",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"styled-components": "^5.3.0",
|
"styled-components": "^5.3.0",
|
||||||
"@dappconnect/vote-poll-sdk-core": "^0.1.0"
|
"@waku/vote-poll-sdk-core": "^0.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/chai": "^4.2.21",
|
"@types/chai": "^4.2.21",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { WakuMessaging } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuMessaging } from '@waku/vote-poll-sdk-core'
|
||||||
import { BigNumber } from 'ethers'
|
import { BigNumber } from 'ethers'
|
||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@dappconnect/vote-sdk-example",
|
"name": "@waku/vote-sdk-example",
|
||||||
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"main": "dist/cjs/src/index.js",
|
"main": "dist/cjs/src/index.js",
|
||||||
@ -33,10 +33,10 @@
|
|||||||
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dappconnect/vote-poll-sdk-core": "^0.1.0",
|
"@waku/vote-poll-sdk-core": "^0.1.0",
|
||||||
"@dappconnect/vote-sdk-react-components": "^0.1.0",
|
"@waku/vote-sdk-react-components": "^0.1.0",
|
||||||
"@dappconnect/vote-sdk-react-hooks": "^0.1.0",
|
"@waku/vote-sdk-react-hooks": "^0.1.0",
|
||||||
"@dappconnect/vote-poll-sdk-react-components": "^0.1.0",
|
"@waku/vote-poll-sdk-react-components": "^0.1.0",
|
||||||
"@usedapp/core": "^0.4.7",
|
"@usedapp/core": "^0.4.7",
|
||||||
"ethers": "^5.4.4",
|
"ethers": "^5.4.4",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
|
@ -5,14 +5,14 @@ import {
|
|||||||
VotingRoomList,
|
VotingRoomList,
|
||||||
VotingRoomListEmpty,
|
VotingRoomListEmpty,
|
||||||
NewVotingRoomModal,
|
NewVotingRoomModal,
|
||||||
} from '@dappconnect/vote-sdk-react-components'
|
} from '@waku/vote-sdk-react-components'
|
||||||
import { blueTheme } from '@dappconnect/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
import { blueTheme } from '@waku/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
||||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuVoting } from '@waku/vote-poll-sdk-core'
|
||||||
import { useTokenBalance } from '@dappconnect/vote-poll-sdk-react-components'
|
import { useTokenBalance } from '@waku/vote-poll-sdk-react-components'
|
||||||
import { useEthers } from '@usedapp/core'
|
import { useEthers } from '@usedapp/core'
|
||||||
import { Modal, Networks, useMobileVersion, Theme } from '@dappconnect/vote-poll-sdk-react-components'
|
import { Modal, Networks, useMobileVersion, Theme } from '@waku/vote-poll-sdk-react-components'
|
||||||
import { useVotingRoomsId } from '@dappconnect/vote-sdk-react-hooks'
|
import { useVotingRoomsId } from '@waku/vote-sdk-react-hooks'
|
||||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
import { VotingRoom } from '@waku/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||||
import { useHistory } from 'react-router'
|
import { useHistory } from 'react-router'
|
||||||
|
|
||||||
type VotingListHeaderProps = {
|
type VotingListHeaderProps = {
|
||||||
|
@ -2,10 +2,10 @@ import React from 'react'
|
|||||||
import { Redirect, Route, Switch, useHistory } from 'react-router'
|
import { Redirect, Route, Switch, useHistory } from 'react-router'
|
||||||
import { BrowserRouter } from 'react-router-dom'
|
import { BrowserRouter } from 'react-router-dom'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { VotingRoomMobile, NewVotingRoomMobile } from '@dappconnect/vote-sdk-react-components'
|
import { VotingRoomMobile, NewVotingRoomMobile } from '@waku/vote-sdk-react-components'
|
||||||
import { Voting } from './Voting'
|
import { Voting } from './Voting'
|
||||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuVoting } from '@waku/vote-poll-sdk-core'
|
||||||
import { useTokenBalance } from '@dappconnect/vote-poll-sdk-react-components'
|
import { useTokenBalance } from '@waku/vote-poll-sdk-react-components'
|
||||||
|
|
||||||
type VotingRoomCreationProps = {
|
type VotingRoomCreationProps = {
|
||||||
tokenBalance: number
|
tokenBalance: number
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import React, { useRef } from 'react'
|
import React, { useRef } from 'react'
|
||||||
import { useWakuVoting } from '@dappconnect/vote-sdk-react-hooks'
|
import { useWakuVoting } from '@waku/vote-sdk-react-hooks'
|
||||||
import { VotingMobile } from './components/VotingMobile'
|
import { VotingMobile } from './components/VotingMobile'
|
||||||
import { Voting } from './components/Voting'
|
import { Voting } from './components/Voting'
|
||||||
import { TopBar, GlobalStyle, useMobileVersion } from '@dappconnect/vote-poll-sdk-react-components'
|
import { TopBar, GlobalStyle, useMobileVersion } from '@waku/vote-poll-sdk-react-components'
|
||||||
import votingIcon from './assets/images/voting.png'
|
import votingIcon from './assets/images/voting.png'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { blueTheme } from '@dappconnect/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
import { blueTheme } from '@waku/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
||||||
import { DAppProvider, ChainId, useEthers, useConfig } from '@usedapp/core'
|
import { DAppProvider, ChainId, useEthers, useConfig } from '@usedapp/core'
|
||||||
import { DEFAULT_CONFIG } from '@usedapp/core/dist/cjs/src/model/config/default'
|
import { DEFAULT_CONFIG } from '@usedapp/core/dist/cjs/src/model/config/default'
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@dappconnect/vote-sdk-react-components",
|
"name": "@waku/vote-sdk-react-components",
|
||||||
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"main": "dist/cjs/src/index.js",
|
"main": "dist/cjs/src/index.js",
|
||||||
@ -33,9 +33,9 @@
|
|||||||
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dappconnect/vote-poll-sdk-core": "^0.1.0",
|
"@waku/vote-poll-sdk-core": "^0.1.0",
|
||||||
"@dappconnect/vote-sdk-react-hooks": "^0.1.0",
|
"@waku/vote-sdk-react-hooks": "^0.1.0",
|
||||||
"@dappconnect/vote-poll-sdk-react-components": "^0.1.0",
|
"@waku/vote-poll-sdk-react-components": "^0.1.0",
|
||||||
"ethers": "^5.4.4",
|
"ethers": "^5.4.4",
|
||||||
"humanize-duration": "^3.27.0",
|
"humanize-duration": "^3.27.0",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Button } from '@dappconnect/vote-poll-sdk-react-components'
|
import { Button } from '@waku/vote-poll-sdk-react-components'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
|
|
||||||
export const Btn = styled(Button)`
|
export const Btn = styled(Button)`
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import React, { useState } from 'react'
|
import React, { useState } from 'react'
|
||||||
import { blueTheme } from '@dappconnect/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
import { blueTheme } from '@waku/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
||||||
import { CloseButton } from '@dappconnect/vote-poll-sdk-react-components/dist/esm/src/components/misc/Buttons'
|
import { CloseButton } from '@waku/vote-poll-sdk-react-components/dist/esm/src/components/misc/Buttons'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { NotificationLink } from './ViewLink'
|
import { NotificationLink } from './ViewLink'
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
import { VotingRoom } from '@waku/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { ViewLink } from './ViewLink'
|
import { ViewLink } from './ViewLink'
|
||||||
|
@ -4,8 +4,8 @@ import { FinalBtn, VoteBtnAgainst, VoteBtnFor } from '../Buttons'
|
|||||||
import { VoteSubmitButton } from './VoteSubmitButton'
|
import { VoteSubmitButton } from './VoteSubmitButton'
|
||||||
import { VoteChart } from './VoteChart'
|
import { VoteChart } from './VoteChart'
|
||||||
import { ViewLink } from '../ViewLink'
|
import { ViewLink } from '../ViewLink'
|
||||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
import { VotingRoom } from '@waku/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuVoting } from '@waku/vote-poll-sdk-core'
|
||||||
|
|
||||||
interface ProposalVoteProps {
|
interface ProposalVoteProps {
|
||||||
votingRoom: VotingRoom
|
votingRoom: VotingRoom
|
||||||
|
@ -8,9 +8,9 @@ import crossIcon from '../../assets/svg/cross.svg'
|
|||||||
import crossWinnerIcon from '../../assets/svg/crossWinner.svg'
|
import crossWinnerIcon from '../../assets/svg/crossWinner.svg'
|
||||||
import checkIcon from '../../assets/svg/check.svg'
|
import checkIcon from '../../assets/svg/check.svg'
|
||||||
import checkWinnerIcon from '../../assets/svg/checkWinner.svg'
|
import checkWinnerIcon from '../../assets/svg/checkWinner.svg'
|
||||||
import { useMobileVersion } from '@dappconnect/vote-poll-sdk-react-components'
|
import { useMobileVersion } from '@waku/vote-poll-sdk-react-components'
|
||||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
import { VotingRoom } from '@waku/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuVoting } from '@waku/vote-poll-sdk-core'
|
||||||
|
|
||||||
export interface VoteChartProps {
|
export interface VoteChartProps {
|
||||||
votingRoom: VotingRoom
|
votingRoom: VotingRoom
|
||||||
|
@ -3,8 +3,8 @@ import styled from 'styled-components'
|
|||||||
import { VoteChart } from '../ProposalVoteCard/VoteChart'
|
import { VoteChart } from '../ProposalVoteCard/VoteChart'
|
||||||
import { DisabledButton, VoteBtnAgainst, VoteBtnFor } from '../Buttons'
|
import { DisabledButton, VoteBtnAgainst, VoteBtnFor } from '../Buttons'
|
||||||
import { VotePropose } from '../VotePropose'
|
import { VotePropose } from '../VotePropose'
|
||||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
import { VotingRoom } from '@waku/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuVoting } from '@waku/vote-poll-sdk-core'
|
||||||
import { BigNumber } from 'ethers'
|
import { BigNumber } from 'ethers'
|
||||||
|
|
||||||
export interface AmountModalProps {
|
export interface AmountModalProps {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuVoting } from '@waku/vote-poll-sdk-core'
|
||||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
import { VotingRoom } from '@waku/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { FinalBtn } from '../Buttons'
|
import { FinalBtn } from '../Buttons'
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import React, { useEffect, useMemo, useState } from 'react'
|
import React, { useEffect, useMemo, useState } from 'react'
|
||||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
import { VotingRoom } from '@waku/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||||
import { Modal, Theme } from '@dappconnect/vote-poll-sdk-react-components'
|
import { Modal, Theme } from '@waku/vote-poll-sdk-react-components'
|
||||||
import { AmountModal } from './AmountModal'
|
import { AmountModal } from './AmountModal'
|
||||||
import { ConfirmModal } from './ConfirmModal'
|
import { ConfirmModal } from './ConfirmModal'
|
||||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuVoting } from '@waku/vote-poll-sdk-core'
|
||||||
|
|
||||||
export interface VoteModalProps {
|
export interface VoteModalProps {
|
||||||
setShowModal: (val: boolean) => void
|
setShowModal: (val: boolean) => void
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuVoting } from '@waku/vote-poll-sdk-core'
|
||||||
import React, { useCallback, useMemo } from 'react'
|
import React, { useCallback, useMemo } from 'react'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import React, { ReactElement, useCallback, useState, useRef, useMemo } from 'react'
|
import React, { ReactElement, useCallback, useState, useRef, useMemo } from 'react'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { Theme } from '@dappconnect/vote-poll-sdk-react-components'
|
import { Theme } from '@waku/vote-poll-sdk-react-components'
|
||||||
import { ProposalInfo } from './ProposalInfo'
|
import { ProposalInfo } from './ProposalInfo'
|
||||||
import { ProposalVote } from './ProposalVoteCard/ProposalVote'
|
import { ProposalVote } from './ProposalVoteCard/ProposalVote'
|
||||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuVoting } from '@waku/vote-poll-sdk-core'
|
||||||
import { useVotingRoom } from '@dappconnect/vote-sdk-react-hooks'
|
import { useVotingRoom } from '@waku/vote-sdk-react-hooks'
|
||||||
import { VoteModal, VoteModalProps } from './VoteModal/VoteModal'
|
import { VoteModal, VoteModalProps } from './VoteModal/VoteModal'
|
||||||
import { useRefMobileVersion } from '@dappconnect/vote-poll-sdk-react-components'
|
import { useRefMobileVersion } from '@waku/vote-poll-sdk-react-components'
|
||||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
import { VotingRoom } from '@waku/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||||
|
|
||||||
interface VotingRoomCardProps {
|
interface VotingRoomCardProps {
|
||||||
votingRoomId: number
|
votingRoomId: number
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { Theme } from '@dappconnect/vote-poll-sdk-react-components'
|
import { Theme } from '@waku/vote-poll-sdk-react-components'
|
||||||
import { VotingRoomCard } from './VotingRoomCard'
|
import { VotingRoomCard } from './VotingRoomCard'
|
||||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuVoting } from '@waku/vote-poll-sdk-core'
|
||||||
|
|
||||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
import { VotingRoom } from '@waku/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||||
|
|
||||||
type VotingRoomListProps = {
|
type VotingRoomListProps = {
|
||||||
theme: Theme
|
theme: Theme
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { CreateButton, Theme } from '@dappconnect/vote-poll-sdk-react-components'
|
import { CreateButton, Theme } from '@waku/vote-poll-sdk-react-components'
|
||||||
|
|
||||||
type VotingRoomListEmptyProps = {
|
type VotingRoomListEmptyProps = {
|
||||||
theme: Theme
|
theme: Theme
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { CreateButton } from '@dappconnect/vote-poll-sdk-react-components'
|
import { CreateButton } from '@waku/vote-poll-sdk-react-components'
|
||||||
import { Theme } from '@dappconnect/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
import { Theme } from '@waku/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
||||||
|
|
||||||
type VotingRoomListHeaderProps = {
|
type VotingRoomListHeaderProps = {
|
||||||
theme: Theme
|
theme: Theme
|
||||||
|
@ -3,7 +3,7 @@ import styled from 'styled-components'
|
|||||||
import { CardHeading } from '../ProposalInfo'
|
import { CardHeading } from '../ProposalInfo'
|
||||||
import { VotingRoomDetailInput, ProposingData } from '../newVoteModal/VotingRoomDetailInput'
|
import { VotingRoomDetailInput, ProposingData } from '../newVoteModal/VotingRoomDetailInput'
|
||||||
import { TokenAmountScreen } from '../newVoteModal/TokenAmountScreen'
|
import { TokenAmountScreen } from '../newVoteModal/TokenAmountScreen'
|
||||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuVoting } from '@waku/vote-poll-sdk-core'
|
||||||
|
|
||||||
interface NewVotingRoomMobileProps {
|
interface NewVotingRoomMobileProps {
|
||||||
availableAmount: number
|
availableAmount: number
|
||||||
|
@ -7,8 +7,8 @@ import { VoteChart } from '../ProposalVoteCard/VoteChart'
|
|||||||
import { ProposalInfo } from '../ProposalInfo'
|
import { ProposalInfo } from '../ProposalInfo'
|
||||||
import { VotePropose } from '../VotePropose'
|
import { VotePropose } from '../VotePropose'
|
||||||
import { VotesBtns } from '../ProposalVoteCard/ProposalVote'
|
import { VotesBtns } from '../ProposalVoteCard/ProposalVote'
|
||||||
import { useVotingRoom } from '@dappconnect/vote-sdk-react-hooks'
|
import { useVotingRoom } from '@waku/vote-sdk-react-hooks'
|
||||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuVoting } from '@waku/vote-poll-sdk-core'
|
||||||
import { BigNumber } from 'ethers'
|
import { BigNumber } from 'ethers'
|
||||||
interface VotingRoomMobileProps {
|
interface VotingRoomMobileProps {
|
||||||
wakuVoting: WakuVoting
|
wakuVoting: WakuVoting
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuVoting } from '@waku/vote-poll-sdk-core'
|
||||||
import { Modal, Theme } from '@dappconnect/vote-poll-sdk-react-components'
|
import { Modal, Theme } from '@waku/vote-poll-sdk-react-components'
|
||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
import { VotingRoomDetailInput } from './VotingRoomDetailInput'
|
import { VotingRoomDetailInput } from './VotingRoomDetailInput'
|
||||||
import { TokenAmountScreen } from './TokenAmountScreen'
|
import { TokenAmountScreen } from './TokenAmountScreen'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuVoting } from '@waku/vote-poll-sdk-core'
|
||||||
import { useEthers } from '@usedapp/core'
|
import { useEthers } from '@usedapp/core'
|
||||||
import React, { useState } from 'react'
|
import React, { useState } from 'react'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
|
@ -2,8 +2,8 @@ import React, { useMemo } from 'react'
|
|||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { ProposingBtn } from '../Buttons'
|
import { ProposingBtn } from '../Buttons'
|
||||||
import { TextArea } from '../Input'
|
import { TextArea } from '../Input'
|
||||||
import { blueTheme } from '@dappconnect/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
import { blueTheme } from '@waku/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
||||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuVoting } from '@waku/vote-poll-sdk-core'
|
||||||
|
|
||||||
interface VotingRoomDetailInputProps {
|
interface VotingRoomDetailInputProps {
|
||||||
availableAmount: number
|
availableAmount: number
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@dappconnect/vote-sdk-react-hooks",
|
"name": "@waku/vote-sdk-react-hooks",
|
||||||
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
"repository": "git@github.com:status-im/dappconnect-vote-poll-sdk.git",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"main": "dist/cjs/src/index.js",
|
"main": "dist/cjs/src/index.js",
|
||||||
@ -27,7 +27,7 @@
|
|||||||
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dappconnect/vote-poll-sdk-core": "^0.1.0",
|
"@waku/vote-poll-sdk-core": "^0.1.0",
|
||||||
"ethers": "^5.4.4",
|
"ethers": "^5.4.4",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"styled-components": "^5.3.0"
|
"styled-components": "^5.3.0"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import React, { useEffect, useState, useRef } from 'react'
|
import React, { useEffect, useState, useRef } from 'react'
|
||||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuVoting } from '@waku/vote-poll-sdk-core'
|
||||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
import { VotingRoom } from '@waku/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||||
|
|
||||||
export function useVotingRoom(id: number, wakuVoting: WakuVoting) {
|
export function useVotingRoom(id: number, wakuVoting: WakuVoting) {
|
||||||
const [votingRoom, setVotingRoom] = useState<VotingRoom | undefined>(undefined)
|
const [votingRoom, setVotingRoom] = useState<VotingRoom | undefined>(undefined)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { id } from '@ethersproject/hash'
|
import { id } from '@ethersproject/hash'
|
||||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuVoting } from '@waku/vote-poll-sdk-core'
|
||||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
import { VotingRoom } from '@waku/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||||
import React, { useEffect, useRef, useState } from 'react'
|
import React, { useEffect, useRef, useState } from 'react'
|
||||||
|
|
||||||
export function useVotingRoomsId(wakuVoting: WakuVoting) {
|
export function useVotingRoomsId(wakuVoting: WakuVoting) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
import { WakuVoting } from '@waku/vote-poll-sdk-core'
|
||||||
import React, { useEffect, useRef, useState } from 'react'
|
import React, { useEffect, useRef, useState } from 'react'
|
||||||
import { Web3Provider } from '@ethersproject/providers'
|
import { Web3Provider } from '@ethersproject/providers'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user