Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
welldan97 committed Nov 14, 2024
1 parent 8a2b476 commit 76b764e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/ton/src/TonNominatorPoolStaker.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Address, toNano, fromNano } from '@ton/ton'
import { Address, toNano, fromNano, TupleReader, TupleItem } from '@ton/ton'
import { defaultValidUntil, TonBaseStaker } from './TonBaseStaker'
import { NominatorInfo, UnsignedTx } from './types'

Expand Down
2 changes: 1 addition & 1 deletion packages/ton/src/TonSingleNominatorPoolStaker.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Address, toNano, Cell, beginCell, fromNano } from '@ton/ton'
import { Address, toNano, Cell, beginCell, fromNano, TupleReader } from '@ton/ton'
import { defaultValidUntil, TonBaseStaker } from './TonBaseStaker'
import { NominatorInfo, UnsignedTx } from './types'

Expand Down
8 changes: 4 additions & 4 deletions packages/ton/test/staker.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TonStaker } from '@chorus-one/ton'
import { TonNominatorPoolStaker } from '@chorus-one/ton'
import { Address, TupleItem, TupleReader } from '@ton/core'
import { describe, it } from 'mocha'
import { use, assert, expect, spy } from 'chai'
Expand All @@ -12,7 +12,7 @@ use(spies)
describe('TonStaker', () => {
const delegatorAddress = '0QDsF87nkTYgkvu1z5xveCEGTRnZmEVaVT0gdxoeyaNvmoCr'
const validatorAddress = 'kf8SWCvzf6eJK4Q0ZOe14PqDdsT5wk0_Ni0wAThL0cVorNVU'
const staker = new TonStaker({
const staker = new TonNominatorPoolStaker({
rpcUrl: 'https://ton.fake.website',
addressDerivationConfig: {
walletContractVersion: 4,
Expand Down Expand Up @@ -75,7 +75,7 @@ describe('TonStaker', () => {
})

it('should generate correct unsigned delegate tx', async () => {
const { tx } = await staker.buildStakeNominatorPoolTx({
const { tx } = await staker.buildStakeTx({
delegatorAddress,
validatorAddress,
amount: '0.5'
Expand Down Expand Up @@ -103,7 +103,7 @@ describe('TonStaker', () => {
const [amount, expectedAmount, expectedError] = testData

const runTest = async (amount: string): Promise<bigint> => {
const { tx } = await staker.buildStakeNominatorPoolTx({
const { tx } = await staker.buildStakeTx({
delegatorAddress,
validatorAddress,
amount
Expand Down

0 comments on commit 76b764e

Please sign in to comment.