mirror of
https://github.com/status-im/dappconnect-voting-sdk.git
synced 2025-02-08 08:53:43 +00:00
Rename core package
This commit is contained in:
parent
6066eb7123
commit
55a8d6adfc
@ -56,7 +56,7 @@ WakuVoting create function expects name of DApp and address of a voting contract
|
||||
Address of token is derived from votingContract
|
||||
|
||||
```ts
|
||||
import { WakuVoting } from '@status-waku-voting/core'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
|
||||
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.
|
||||
|
||||
```ts
|
||||
import { WakuPolling } from '@status-waku-voting/core'
|
||||
import { WakuPolling } from '@dappconnect/vote-poll-sdk-core'
|
||||
|
||||
await WakuPolling.create(appName, tokenAddress, provider, multicallAddress, waku)
|
||||
```
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@status-waku-voting/core",
|
||||
"name": "@dappconnect/vote-poll-sdk-core",
|
||||
"main": "dist/cjs/src/index.js",
|
||||
"module": "dist/esm/src/index.js",
|
||||
"types": "dist/esm/src/index.d.ts",
|
||||
|
@ -32,7 +32,7 @@
|
||||
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@status-waku-voting/core": "^0.1.0",
|
||||
"@dappconnect/vote-poll-sdk-core": "^0.1.0",
|
||||
"@status-waku-voting/polling-hooks": "^0.1.0",
|
||||
"@status-waku-voting/react-components": "^0.1.0",
|
||||
"ethers": "^5.4.4",
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { WakuPolling } from '@status-waku-voting/core'
|
||||
import { DetailedTimedPoll } from '@status-waku-voting/core/dist/esm/src/models/DetailedTimedPoll'
|
||||
import { WakuPolling } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { DetailedTimedPoll } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/models/DetailedTimedPoll'
|
||||
import { BigNumber } from 'ethers'
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { PollType } from '@status-waku-voting/core/dist/esm/src/types/PollType'
|
||||
import { PollType } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||
import styled from 'styled-components'
|
||||
import { RadioGroup, SmallButton, Theme } from '@status-waku-voting/react-components'
|
||||
import { PollResults } from './PollResults'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React, { ReactNode, useState } from 'react'
|
||||
import styled from 'styled-components'
|
||||
import { PollType } from '@status-waku-voting/core/dist/esm/src/types/PollType'
|
||||
import { WakuPolling } from '@status-waku-voting/core'
|
||||
import { PollType } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||
import { WakuPolling } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { Input, addIcon, SmallButton, Modal, Theme } from '@status-waku-voting/react-components'
|
||||
|
||||
function getLocaleIsoTime(dateTime: Date) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { WakuPolling } from '@status-waku-voting/core'
|
||||
import { DetailedTimedPoll } from '@status-waku-voting/core/dist/esm/src/models/DetailedTimedPoll'
|
||||
import { WakuPolling } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { DetailedTimedPoll } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/models/DetailedTimedPoll'
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { Poll } from './Poll'
|
||||
import styled from 'styled-components'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { DetailedTimedPoll } from '@status-waku-voting/core/dist/esm/src/models/DetailedTimedPoll'
|
||||
import { DetailedTimedPoll } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/models/DetailedTimedPoll'
|
||||
import styled from 'styled-components'
|
||||
import { colorRouletteGenerator, checkCircleIcon } from '@status-waku-voting/react-components'
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@status-waku-voting/core": "^0.1.0",
|
||||
"@dappconnect/vote-poll-sdk-core": "^0.1.0",
|
||||
"@status-waku-voting/polling-components": "^0.1.0",
|
||||
"@status-waku-voting/polling-hooks": "^0.1.0",
|
||||
"@status-waku-voting/react-components": "^0.1.0",
|
||||
|
@ -28,7 +28,7 @@
|
||||
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@status-waku-voting/core": "^0.1.0",
|
||||
"@dappconnect/vote-poll-sdk-core": "^0.1.0",
|
||||
"@usedapp/core": "^0.4.7",
|
||||
"ethers": "^5.4.4",
|
||||
"react": "^17.0.2",
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { WakuPolling } from '@status-waku-voting/core'
|
||||
import { DetailedTimedPoll } from '@status-waku-voting/core/dist/esm/src/models/DetailedTimedPoll'
|
||||
import { WakuPolling } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { DetailedTimedPoll } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/models/DetailedTimedPoll'
|
||||
import React, { useEffect, useState } from 'react'
|
||||
|
||||
export function usePollList(wakuPolling: WakuPolling | undefined) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { useEffect, useState, useRef } from 'react'
|
||||
import { WakuPolling } from '@status-waku-voting/core'
|
||||
import { WakuPolling } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { Web3Provider } from '@ethersproject/providers'
|
||||
|
||||
export function useWakuPolling(
|
||||
|
@ -33,7 +33,7 @@
|
||||
"ethers": "^5.4.4",
|
||||
"react": "^17.0.2",
|
||||
"styled-components": "^5.3.0",
|
||||
"@status-waku-voting/core": "^0.1.0"
|
||||
"@dappconnect/vote-poll-sdk-core": "^0.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/chai": "^4.2.21",
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { WakuMessaging } from '@status-waku-voting/core'
|
||||
import { WakuMessaging } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { BigNumber } from 'ethers'
|
||||
import React, { useEffect, useState } from 'react'
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@status-waku-voting/core": "^0.1.0",
|
||||
"@dappconnect/vote-poll-sdk-core": "^0.1.0",
|
||||
"@status-waku-voting/voting-hooks": "^0.1.0",
|
||||
"@status-waku-voting/react-components": "^0.1.0",
|
||||
"ethers": "^5.4.4",
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { VotingRoom } from '@status-waku-voting/core/dist/esm/src/types/PollType'
|
||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||
import React from 'react'
|
||||
import styled from 'styled-components'
|
||||
import { ViewLink } from './ViewLink'
|
||||
|
@ -4,8 +4,8 @@ import { FinalBtn, VoteBtnAgainst, VoteBtnFor } from '../Buttons'
|
||||
import { VoteSubmitButton } from './VoteSubmitButton'
|
||||
import { VoteChart } from './VoteChart'
|
||||
import { ViewLink } from '../ViewLink'
|
||||
import { VotingRoom } from '@status-waku-voting/core/dist/esm/src/types/PollType'
|
||||
import { WakuVoting } from '@status-waku-voting/core'
|
||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
|
||||
interface ProposalVoteProps {
|
||||
votingRoom: VotingRoom
|
||||
|
@ -9,8 +9,8 @@ import crossWinnerIcon from '../../assets/svg/crossWinner.svg'
|
||||
import checkIcon from '../../assets/svg/check.svg'
|
||||
import checkWinnerIcon from '../../assets/svg/checkWinner.svg'
|
||||
import { useMobileVersion } from '@status-waku-voting/react-components'
|
||||
import { VotingRoom } from '@status-waku-voting/core/dist/esm/src/types/PollType'
|
||||
import { WakuVoting } from '@status-waku-voting/core'
|
||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
|
||||
export interface VoteChartProps {
|
||||
votingRoom: VotingRoom
|
||||
|
@ -3,8 +3,8 @@ import styled from 'styled-components'
|
||||
import { VoteChart } from '../ProposalVoteCard/VoteChart'
|
||||
import { DisabledButton, VoteBtnAgainst, VoteBtnFor } from '../Buttons'
|
||||
import { VotePropose } from '../VotePropose'
|
||||
import { VotingRoom } from '@status-waku-voting/core/dist/esm/src/types/PollType'
|
||||
import { WakuVoting } from '@status-waku-voting/core'
|
||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { BigNumber } from 'ethers'
|
||||
|
||||
export interface AmountModalProps {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { WakuVoting } from '@status-waku-voting/core'
|
||||
import { VotingRoom } from '@status-waku-voting/core/dist/esm/src/types/PollType'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||
import React from 'react'
|
||||
import styled from 'styled-components'
|
||||
import { FinalBtn } from '../Buttons'
|
||||
|
@ -1,9 +1,9 @@
|
||||
import React, { useEffect, useMemo, useState } from 'react'
|
||||
import { VotingRoom } from '@status-waku-voting/core/dist/esm/src/types/PollType'
|
||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||
import { Modal, Theme } from '@status-waku-voting/react-components'
|
||||
import { AmountModal } from './AmountModal'
|
||||
import { ConfirmModal } from './ConfirmModal'
|
||||
import { WakuVoting } from '@status-waku-voting/core'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
|
||||
export interface VoteModalProps {
|
||||
setShowModal: (val: boolean) => void
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { WakuVoting } from '@status-waku-voting/core'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
import React, { useCallback, useMemo } from 'react'
|
||||
import { useState } from 'react'
|
||||
import styled from 'styled-components'
|
||||
|
@ -3,11 +3,11 @@ import styled from 'styled-components'
|
||||
import { Theme } from '@status-waku-voting/react-components'
|
||||
import { ProposalInfo } from './ProposalInfo'
|
||||
import { ProposalVote } from './ProposalVoteCard/ProposalVote'
|
||||
import { WakuVoting } from '@status-waku-voting/core'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { useVotingRoom } from '@status-waku-voting/voting-hooks'
|
||||
import { VoteModal, VoteModalProps } from './VoteModal/VoteModal'
|
||||
import { useRefMobileVersion } from '@status-waku-voting/react-components'
|
||||
import { VotingRoom } from '@status-waku-voting/core/dist/esm/src/types/PollType'
|
||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||
|
||||
interface VotingRoomCardProps {
|
||||
votingRoomId: number
|
||||
|
@ -2,9 +2,9 @@ import React from 'react'
|
||||
import styled from 'styled-components'
|
||||
import { Theme } from '@status-waku-voting/react-components'
|
||||
import { VotingRoomCard } from './VotingRoomCard'
|
||||
import { WakuVoting } from '@status-waku-voting/core'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
|
||||
import { VotingRoom } from '@status-waku-voting/core/dist/esm/src/types/PollType'
|
||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||
|
||||
type VotingRoomListProps = {
|
||||
theme: Theme
|
||||
|
@ -3,7 +3,7 @@ import styled from 'styled-components'
|
||||
import { CardHeading } from '../ProposalInfo'
|
||||
import { VotingRoomDetailInput, ProposingData } from '../newVoteModal/VotingRoomDetailInput'
|
||||
import { TokenAmountScreen } from '../newVoteModal/TokenAmountScreen'
|
||||
import { WakuVoting } from '@status-waku-voting/core'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
|
||||
interface NewVotingRoomMobileProps {
|
||||
availableAmount: number
|
||||
|
@ -8,7 +8,7 @@ import { ProposalInfo } from '../ProposalInfo'
|
||||
import { VotePropose } from '../VotePropose'
|
||||
import { VotesBtns } from '../ProposalVoteCard/ProposalVote'
|
||||
import { useVotingRoom } from '@status-waku-voting/voting-hooks'
|
||||
import { WakuVoting } from '@status-waku-voting/core'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { BigNumber } from 'ethers'
|
||||
interface VotingRoomMobileProps {
|
||||
wakuVoting: WakuVoting
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { WakuVoting } from '@status-waku-voting/core'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { Modal, Theme } from '@status-waku-voting/react-components'
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { VotingRoomDetailInput } from './VotingRoomDetailInput'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { WakuVoting } from '@status-waku-voting/core'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { useEthers } from '@usedapp/core'
|
||||
import React, { useState } from 'react'
|
||||
import styled from 'styled-components'
|
||||
|
@ -3,7 +3,7 @@ import styled from 'styled-components'
|
||||
import { ProposingBtn } from '../Buttons'
|
||||
import { TextArea } from '../Input'
|
||||
import { blueTheme } from '@status-waku-voting/react-components/dist/esm/src/style/themes'
|
||||
import { WakuVoting } from '@status-waku-voting/core'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
|
||||
interface VotingRoomDetailInputProps {
|
||||
availableAmount: number
|
||||
|
@ -32,7 +32,7 @@
|
||||
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@status-waku-voting/core": "^0.1.0",
|
||||
"@dappconnect/vote-poll-sdk-core": "^0.1.0",
|
||||
"@status-waku-voting/voting-components": "^0.1.0",
|
||||
"@status-waku-voting/voting-hooks": "^0.1.0",
|
||||
"@status-waku-voting/react-components": "^0.1.0",
|
||||
|
@ -7,12 +7,12 @@ import {
|
||||
NewVotingRoomModal,
|
||||
} from '@status-waku-voting/voting-components'
|
||||
import { blueTheme } from '@status-waku-voting/react-components/dist/esm/src/style/themes'
|
||||
import { WakuVoting } from '@status-waku-voting/core'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { useTokenBalance } from '@status-waku-voting/react-components'
|
||||
import { useEthers } from '@usedapp/core'
|
||||
import { Modal, Networks, useMobileVersion, Theme } from '@status-waku-voting/react-components'
|
||||
import { useVotingRoomsId } from '@status-waku-voting/voting-hooks'
|
||||
import { VotingRoom } from '@status-waku-voting/core/dist/esm/src/types/PollType'
|
||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||
import { useHistory } from 'react-router'
|
||||
|
||||
type VotingListHeaderProps = {
|
||||
|
@ -4,7 +4,7 @@ import { BrowserRouter } from 'react-router-dom'
|
||||
import styled from 'styled-components'
|
||||
import { VotingRoomMobile, NewVotingRoomMobile } from '@status-waku-voting/voting-components'
|
||||
import { Voting } from './Voting'
|
||||
import { WakuVoting } from '@status-waku-voting/core'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { useTokenBalance } from '@status-waku-voting/react-components'
|
||||
|
||||
type VotingRoomCreationProps = {
|
||||
|
@ -26,7 +26,7 @@
|
||||
"lint:prettier": "yarn prettier './{src,test}/**/*.{ts,tsx}'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@status-waku-voting/core": "^0.1.0",
|
||||
"@dappconnect/vote-poll-sdk-core": "^0.1.0",
|
||||
"ethers": "^5.4.4",
|
||||
"react": "^17.0.2",
|
||||
"styled-components": "^5.3.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React, { useEffect, useState, useRef } from 'react'
|
||||
import { WakuVoting } from '@status-waku-voting/core'
|
||||
import { VotingRoom } from '@status-waku-voting/core/dist/esm/src/types/PollType'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||
|
||||
export function useVotingRoom(id: number, wakuVoting: WakuVoting) {
|
||||
const [votingRoom, setVotingRoom] = useState<VotingRoom | undefined>(undefined)
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { id } from '@ethersproject/hash'
|
||||
import { WakuVoting } from '@status-waku-voting/core'
|
||||
import { VotingRoom } from '@status-waku-voting/core/dist/esm/src/types/PollType'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||
import React, { useEffect, useRef, useState } from 'react'
|
||||
|
||||
export function useVotingRoomsId(wakuVoting: WakuVoting) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { WakuVoting } from '@status-waku-voting/core'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
import React, { useEffect, useRef, useState } from 'react'
|
||||
import { Web3Provider } from '@ethersproject/providers'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user