Skip to content

Commit 969591e

Browse files
authored
chore(deps): remove @project-serum/common (#127)
1 parent 96afd55 commit 969591e

File tree

7 files changed

+12
-15
lines changed

7 files changed

+12
-15
lines changed

actions/registerRealm.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ import {
3838
import { withCreateMintGovernance } from '@solana/spl-governance';
3939
import { withSetRealmAuthority } from '@solana/spl-governance';
4040
import { AccountInfo, u64 } from '@solana/spl-token';
41-
import { ProgramAccount } from '@project-serum/common';
4241
import { tryGetAta } from '@utils/validations';
4342
import { ConnectionContext } from '@utils/connection';
4443
import { MIN_COMMUNITY_TOKENS_TO_CREATE_W_0_SUPPLY } from '@tools/constants';
4544
import BigNumber from 'bignumber.js';
45+
import { TokenProgramAccount } from '@utils/tokens';
4646

4747
interface RegisterRealmRpc {
4848
connection: ConnectionContext;
@@ -106,11 +106,9 @@ async function prepareMintInstructions(
106106
// then should create mints to them
107107
if (otherOwners?.length) {
108108
for (const ownerPk of otherOwners) {
109-
const ata: ProgramAccount<AccountInfo> | undefined = await tryGetAta(
110-
connection.current,
111-
ownerPk,
112-
_mintPk,
113-
);
109+
const ata:
110+
| TokenProgramAccount<AccountInfo>
111+
| undefined = await tryGetAta(connection.current, ownerPk, _mintPk);
114112
const shouldMint = !ata?.account.amount.gt(BN_ZERO);
115113

116114
const ataPk =

hooks/useSaberStats.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { useCallback, useEffect, useState } from 'react';
33
import {
44
SolanaAugmentedProvider,
55
SolanaProvider,
6+
SignerWallet,
67
} from '@saberhq/solana-contrib';
7-
import { Wallet } from '@project-serum/common';
88
import useWalletStore from 'stores/useWalletStore';
99
import {
1010
findMinerAddress,
@@ -63,7 +63,7 @@ const useSaberStats = (hotWalletAccount: HotWalletAccount) => {
6363
SolanaProvider.load({
6464
connection: connection.current,
6565
sendConnection: connection.current,
66-
wallet: wallet as Wallet,
66+
wallet: (wallet as unknown) as SignerWallet,
6767
}),
6868
),
6969
});

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"@orca-so/whirlpools-sdk": "^0.5.0",
4242
"@project-serum/anchor": "^0.22.1",
4343
"@project-serum/borsh": "^0.2.5",
44-
"@project-serum/common": "^0.0.1-beta.3",
4544
"@project-serum/sol-wallet-adapter": "^0.2.0",
4645
"@quarryprotocol/quarry-sdk": "^3.0.0",
4746
"@raydium-io/raydium-sdk": "^1.0.1-beta.34",

pages/dao/[symbol]/proposal/components/instructions/SaberPeriphery/RedeemAllTokensFromMintProxy.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as yup from 'yup';
2-
import { Wallet } from '@project-serum/common';
32
import {
43
SolanaAugmentedProvider,
54
SolanaProvider,
5+
SignerWallet,
66
} from '@saberhq/solana-contrib';
77
import Select from '@components/inputs/Select';
88
import useInstructionFormBuilder from '@hooks/useInstructionFormBuilder';
@@ -50,7 +50,7 @@ const RedeemAllTokensFromMintProxy = ({
5050
augmentedProvider: new SolanaAugmentedProvider(
5151
SolanaProvider.init({
5252
connection: connection,
53-
wallet: wallet as Wallet,
53+
wallet: (wallet as unknown) as SignerWallet,
5454
}),
5555
),
5656
authority: governedAccountPubkey,

tools/sdk/augmentedProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Wallet } from '@project-serum/common';
21
import {
32
SolanaAugmentedProvider,
43
SolanaProvider,
4+
SignerWallet,
55
} from '@saberhq/solana-contrib';
66
import { SignerWalletAdapter } from '@solana/wallet-adapter-base';
77
import { Connection } from '@solana/web3.js';
@@ -13,7 +13,7 @@ export const augmentedProvider = (
1313
return new SolanaAugmentedProvider(
1414
SolanaProvider.init({
1515
connection: connection,
16-
wallet: wallet as Wallet,
16+
wallet: (wallet as unknown) as SignerWallet,
1717
}),
1818
);
1919
};

utils/send.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
TransactionSignature,
1010
} from '@solana/web3.js';
1111
import Wallet from '@project-serum/sol-wallet-adapter';
12-
import { sleep } from '@project-serum/common';
12+
import { sleep } from './sendTransactions';
1313

1414
class TransactionError extends Error {
1515
public txid: string;

utils/sendTransactions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { SignerWalletAdapter } from '@project-serum/sol-wallet-adapter';
1616
// In particular common primitives should be unified with send.tsx and also ensure the same resiliency mechanism
1717
// is used for monitoring transactions status and timeouts
1818

19-
const sleep = (ttl: number) =>
19+
export const sleep = (ttl: number) =>
2020
new Promise((resolve) => setTimeout(() => resolve(true), ttl));
2121

2222
export type WalletSigner = Pick<

0 commit comments

Comments
 (0)