Skip to content

Commit

Permalink
[PVM] Added missing condition for claimtx in SelectTxClass
Browse files Browse the repository at this point in the history
  • Loading branch information
knikos committed Apr 19, 2023
1 parent 334f651 commit e479402
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/apis/platformvm/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { TransactionError } from "../../utils/errors"
import { RegisterNodeTx } from "./registernodetx"
import { DepositTx } from "./depositTx"
import { AddressStateTx } from "./addressstatetx"
import { ClaimTx } from "./claimtx"

/**
* @ignore
Expand Down Expand Up @@ -63,6 +64,8 @@ export const SelectTxClass = (txtype: number, ...args: any[]): BaseTx => {
return new DepositTx(...args)
} else if (txtype === PlatformVMConstants.ADDRESSSTATETX) {
return new AddressStateTx(...args)
} else if (txtype === PlatformVMConstants.CLAIMTX) {
return new ClaimTx(...args)
}
/* istanbul ignore next */
throw new TransactionError("Error - SelectTxClass: unknown txtype")
Expand Down

0 comments on commit e479402

Please sign in to comment.