Skip to content

Commit

Permalink
Merge branch 'develop' into enable-playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
devchenyan authored Apr 7, 2024
2 parents 1c9f640 + acfe4b0 commit b9915a7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[default.extend-words]
thur = "thur"
numer = "numer"
HD = "HD"
hd = "hd"

# defined in database schema
lastest = "lastest"
Expand Down
16 changes: 8 additions & 8 deletions packages/neuron-wallet/src/services/transaction-sender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,8 @@ export default class TransactionSender {

const currentNetwork = NetworksService.getInstance().getCurrent()
const rpcService = new RpcService(currentNetwork.remote, currentNetwork.type)
const depositeOutput = await CellsService.getLiveCell(outPoint)
if (!depositeOutput) {
const depositOutput = await CellsService.getLiveCell(outPoint)
if (!depositOutput) {
throw new CellIsNotYetLive()
}
const prevTx = await rpcService.getTransaction(outPoint.txHash)
Expand All @@ -690,7 +690,7 @@ export default class TransactionSender {
const tx: Transaction = await TransactionGenerator.startWithdrawFromDao(
walletID,
outPoint,
depositeOutput,
depositOutput,
depositBlockHeader!.number,
depositBlockHeader!.hash,
changeAddress!.address,
Expand Down Expand Up @@ -736,13 +736,13 @@ export default class TransactionSender {
if (!withdrawOutput.depositOutPoint) {
throw new Error('DAO has not finish step first withdraw')
}
const depositeTx = await rpcService.getTransaction(withdrawOutput.depositOutPoint.txHash)
if (!depositeTx?.txStatus.blockHash) {
throw new Error(`Get deposite block hash failed with tx hash ${withdrawOutput.depositOutPoint.txHash}`)
const depositTx = await rpcService.getTransaction(withdrawOutput.depositOutPoint.txHash)
if (!depositTx?.txStatus.blockHash) {
throw new Error(`Get deposit block hash failed with tx hash ${withdrawOutput.depositOutPoint.txHash}`)
}
const depositBlockHeader = await rpcService.getHeader(depositeTx.txStatus.blockHash)
const depositBlockHeader = await rpcService.getHeader(depositTx.txStatus.blockHash)
if (!depositBlockHeader) {
throw new Error(`Get Header failed with blockHash ${depositeTx.txStatus.blockHash}`)
throw new Error(`Get Header failed with blockHash ${depositTx.txStatus.blockHash}`)
}
const depositEpoch = this.parseEpoch(BigInt(depositBlockHeader.epoch))
const depositCapacity: bigint = BigInt(withdrawOutput.capacity)
Expand Down
4 changes: 2 additions & 2 deletions packages/neuron-wallet/tests/services/cells.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ describe('CellsService', () => {
)
).rejects.toThrow(new LiveCapacityNotEnough())
})
it('left capcity not enough for a cell throw CapacityNotEnoughForChange', async () => {
it('left capacity not enough for a cell throw CapacityNotEnoughForChange', async () => {
await createMultisigCell(toShannon('1000'), OutputStatus.Sent, multisigInfo)
await expect(
CellsService.gatherInputs(
Expand Down Expand Up @@ -660,7 +660,7 @@ describe('CellsService', () => {
)
).rejects.toThrow(new LiveCapacityNotEnough())
})
it('left capcity not enough for a cell throw CapacityNotEnoughForChange', async () => {
it('left capacity not enough for a cell throw CapacityNotEnoughForChange', async () => {
await expect(
CellsService.gatherInputs(
toShannon('990'),
Expand Down

1 comment on commit b9915a7

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 8588113384

Please sign in to comment.