Skip to content

Commit

Permalink
wip: some more chaining p-chain txbuilder with wallet builder and signer
Browse files Browse the repository at this point in the history
  • Loading branch information
abi87 committed Feb 21, 2024
1 parent 0cd2d7e commit 95d64cc
Show file tree
Hide file tree
Showing 10 changed files with 290 additions and 416 deletions.
8 changes: 4 additions & 4 deletions vms/platformvm/txs/backends/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var (
errNoChangeAddress = errors.New("no possible change address")
errUnknownOwnerType = errors.New("unknown owner type")
errInsufficientAuthorization = errors.New("insufficient authorization")
errInsufficientFunds = errors.New("insufficient funds")
ErrInsufficientFunds = errors.New("insufficient funds")

_ Builder = (*builder)(nil)
)
Expand Down Expand Up @@ -624,7 +624,7 @@ func (b *builder) NewImportTx(
if len(importedInputs) == 0 {
return nil, fmt.Errorf(
"%w: no UTXOs available to import",
errInsufficientFunds,
ErrInsufficientFunds,
)
}

Expand Down Expand Up @@ -1112,7 +1112,7 @@ func (b *builder) spend(
if amount != 0 {
return nil, nil, nil, fmt.Errorf(
"%w: provided UTXOs need %d more units of asset %q to stake",
errInsufficientFunds,
ErrInsufficientFunds,
amount,
assetID,
)
Expand All @@ -1122,7 +1122,7 @@ func (b *builder) spend(
if amount != 0 {
return nil, nil, nil, fmt.Errorf(
"%w: provided UTXOs need %d more units of asset %q",
errInsufficientFunds,
ErrInsufficientFunds,
amount,
assetID,
)
Expand Down
Loading

0 comments on commit 95d64cc

Please sign in to comment.