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

fix: package deps #246

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ View the [demo](https://0xsequence.github.io/kit)! 👀
To install this package:

```bash
npm install @0xsequence/kit wagmi [email protected] viem 0xsequence @tanstack/react-query
npm install @0xsequence/kit wagmi [email protected] viem 0xsequence @tanstack/react-query @react-oauth/google react-apple-signin-auth
# or
pnpm install @0xsequence/kit wagmi [email protected] viem 0xsequence @tanstack/react-query
pnpm install @0xsequence/kit wagmi [email protected] viem 0xsequence @tanstack/react-query @react-oauth/google react-apple-signin-auth
# or
yarn add @0xsequence/kit wagmi [email protected] viem 0xsequence @tanstack/react-query
yarn add @0xsequence/kit wagmi [email protected] viem 0xsequence @tanstack/react-query @react-oauth/google react-apple-signin-auth
```

### Setting up the Library
Expand Down Expand Up @@ -96,8 +96,8 @@ import Content from './components/Content'

const config = createConfig('waas', {
projectAccessKey: '<your-project-access-key>',
chainIds: [1, 137]
defaultChainId: 1
chainIds: [1, 137],
defaultChainId: 1,
appName: 'Demo Dapp',
waasConfigKey: '<your-waas-config-key>',

Expand Down Expand Up @@ -269,7 +269,7 @@ The settings are described in more detailed in the Sequence Kit documentation.
signIn: {
logoUrl: 'https://logo-dark-mode.svg',
projectName: 'my app',
};
},
// limits the digital assets displayed on the assets summary screen
displayedAssets: [
{
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@
"rimraf": "^5.0.7",
"turbo": "2.0.1",
"typescript": "~5.4.5",
"wagmi": "^2.13.3"
"wagmi": "^2.13.3",
"viem": ">= 2.0.0",
"@tanstack/react-query": ">= 5.0.0",
"framer-motion": ">= 6.0.0"
},
"resolutions": {},
"packageManager": "[email protected]"
}
}
7 changes: 5 additions & 2 deletions packages/checkout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"vite": "^5.2.11",
"wagmi": "^2.13.3"
"wagmi": "^2.13.3",
"@0xsequence/metadata": ">= 2.2.4",
"@0xsequence/network": ">= 2.2.4",
"@0xsequence/indexer": ">= 2.2.4"
}
}
}
2 changes: 1 addition & 1 deletion packages/checkout/src/views/TransactionStatus/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
CloseIcon,
truncateAddress
} from '@0xsequence/design-system'
import { SequenceIndexer, TransactionStatus as TransactionStatusSequence } from '@0xsequence/indexer'
import {
CollectibleTileImage,
useContractInfo,
Expand All @@ -19,7 +20,6 @@ import {
waitForTransactionReceipt,
useIndexerClient
} from '@0xsequence/kit'
import { SequenceIndexer, TransactionStatus as TransactionStatusSequence } from '@0xsequence/indexer'
import { findSupportedNetwork } from '@0xsequence/network'
import { useState, useEffect } from 'react'
import TimeAgo from 'timeago-react'
Expand Down
10 changes: 5 additions & 5 deletions packages/kit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ View the [demo](https://0xsequence.github.io/kit)! 👀
To install this package:

```bash
npm install @0xsequence/kit wagmi [email protected] viem 0xsequence @tanstack/react-query
npm install @0xsequence/kit wagmi [email protected] viem 0xsequence @tanstack/react-query @react-oauth/google react-apple-signin-auth
# or
pnpm install @0xsequence/kit wagmi [email protected] viem 0xsequence @tanstack/react-query
pnpm install @0xsequence/kit wagmi [email protected] viem 0xsequence @tanstack/react-query @react-oauth/google react-apple-signin-auth
# or
yarn add @0xsequence/kit wagmi [email protected] viem 0xsequence @tanstack/react-query
yarn add @0xsequence/kit wagmi [email protected] viem 0xsequence @tanstack/react-query @react-oauth/google react-apple-signin-auth
```

### Setting up the Library
Expand Down Expand Up @@ -95,8 +95,8 @@ import Content from './components/Content'

const config = createConfig('waas', {
projectAccessKey: '<your-project-access-key>',
chainIds: [1, 137]
defaultChainId: 1
chainIds: [1, 137],
defaultChainId: 1,
appName: 'Demo Dapp',
waasConfigKey: '<your-waas-config-key>',

Expand Down
4 changes: 3 additions & 1 deletion packages/kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@
},
"devDependencies": {
"0xsequence": "^2.2.4",
"@react-oauth/google": ">= 0.11.1",
"react-apple-signin-auth": ">= 1.1.0",
"@tanstack/react-query": "^5.37.1",
"@types/uuid": "^9.0.8",
"ethers": "6.13.0",
"viem": "^2.12.0",
"wagmi": "^2.13.3"
}
}
}
35 changes: 17 additions & 18 deletions packages/kit/src/utils/transactions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { sequence } from '0xsequence'
import { SequenceWaaS } from '@0xsequence/waas'
import { SequenceIndexer, TransactionStatus, TransactionReceipt } from '@0xsequence/indexer'
import { SequenceWaaS } from '@0xsequence/waas'
import { PublicClient, WalletClient, Hex } from 'viem'
import { Connector } from 'wagmi'

Expand Down Expand Up @@ -159,30 +159,29 @@ export const waitForTransactionReceipt = async ({
confirmations
}: WaitForTransactionReceiptInput): Promise<TransactionReceipt> => {
const receiptPromise = new Promise<TransactionReceipt>(async (resolve, reject) => {
await indexerClient.subscribeReceipts({
filter: {
txnHash
},
}, {
onMessage: ({
receipt
}) => {
resolve(receipt)
await indexerClient.subscribeReceipts(
{
filter: {
txnHash
}
},
onError: () => {
reject('Transaction receipt not found')
{
onMessage: ({ receipt }) => {
resolve(receipt)
},
onError: () => {
reject('Transaction receipt not found')
}
}
})
)
})

const receipt = await receiptPromise
const receipt = await receiptPromise

if (confirmations) {
const blockConfirmationPromise = new Promise<void>((resolve, reject) => {
const unwatch = publicClient.watchBlocks({
onBlock: ({
number: currentBlockNumber
}) => {
onBlock: ({ number: currentBlockNumber }) => {
const confirmedBlocknumber = receipt.blockNumber + confirmations
if (currentBlockNumber >= confirmedBlocknumber) {
unwatch()
Expand All @@ -196,4 +195,4 @@ export const waitForTransactionReceipt = async ({
}

return receipt
}
}
7 changes: 5 additions & 2 deletions packages/wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
"framer-motion": "^8.5.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"wagmi": "^2.13.3"
"wagmi": "^2.13.3",
"@0xsequence/indexer": ">= 2.2.4",
"@0xsequence/api": ">= 2.2.4",
"@0xsequence/metadata": ">= 2.2.4"
}
}
}
Loading
Loading