Skip to content

Commit

Permalink
fix obsolete fn name
Browse files Browse the repository at this point in the history
  • Loading branch information
altkdf committed Oct 4, 2024
1 parent 7bc70c1 commit 718dae1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions motoko/basic_bitcoin/src/basic_bitcoin/src/P2trScriptSpend.mo
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module {
amount : Satoshi,
fee_per_vbyte : MillisatoshiPerVByte,
) : async [Nat8] {
let dst_address_typed = Utils.get_ok_except(Address.addressFromText(dst_address), "failed to decode destination address");
let dst_address_typed = Utils.get_ok_expect(Address.addressFromText(dst_address), "failed to decode destination address");

// We have a chicken-and-egg problem where we need to know the length
// of the transaction in order to compute its proper fee, but we need
Expand All @@ -93,7 +93,7 @@ module {
var total_fee : Nat = 0;

loop {
let transaction = Utils.get_ok_except(Bitcoin.buildTransaction(2, own_utxos, [(dst_address_typed, amount)], #p2tr_key own_address, Nat64.fromNat(total_fee)), "Error building transaction.");
let transaction = Utils.get_ok_expect(Bitcoin.buildTransaction(2, own_utxos, [(dst_address_typed, amount)], #p2tr_key own_address, Nat64.fromNat(total_fee)), "Error building transaction.");
let tx_in_outpoints = Array.map<TxInput.TxInput, Types.OutPoint>(transaction.txInputs, func(txin) { txin.prevOutput });

let amounts = Array.mapFilter<Utxo, Satoshi>(
Expand Down

0 comments on commit 718dae1

Please sign in to comment.