Skip to content

Commit 10f1d07

Browse files
committed
fix: change Amount param to align with rust param
1 parent 8135df4 commit 10f1d07

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

bdk-ffi/src/bitcoin.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ pub struct Amount(pub BdkAmount);
9999
#[uniffi::export]
100100
impl Amount {
101101
#[uniffi::constructor]
102-
pub fn from_sat(sat: u64) -> Self {
103-
Amount(BdkAmount::from_sat(sat))
102+
pub fn from_sat(satoshi: u64) -> Self {
103+
Amount(BdkAmount::from_sat(satoshi))
104104
}
105105

106106
#[uniffi::constructor]

bdk-swift/Tests/BitcoinDevKitTests/LiveTxBuilderTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ final class LiveTxBuilderTests: XCTestCase {
6060

6161
let recipient: Address = try Address(address: "tb1qrnfslnrve9uncz9pzpvf83k3ukz22ljgees989", network: .signet)
6262
let psbt: Psbt = try TxBuilder()
63-
.addRecipient(script: recipient.scriptPubkey(), amount: Amount.fromSat(fromSat: 4200))
63+
.addRecipient(script: recipient.scriptPubkey(), amount: Amount.fromSat(satoshi: 4200))
6464
.feeRate(feeRate: FeeRate.fromSatPerVb(satVb: 2))
6565
.finish(wallet: wallet)
6666

@@ -95,8 +95,8 @@ final class LiveTxBuilderTests: XCTestCase {
9595
let recipient1: Address = try Address(address: "tb1qrnfslnrve9uncz9pzpvf83k3ukz22ljgees989", network: .signet)
9696
let recipient2: Address = try Address(address: "tb1qw2c3lxufxqe2x9s4rdzh65tpf4d7fssjgh8nv6", network: .signet)
9797
let allRecipients: [ScriptAmount] = [
98-
ScriptAmount(script: recipient1.scriptPubkey(), amount: Amount.fromSat(fromSat: 4200)),
99-
ScriptAmount(script: recipient2.scriptPubkey(), amount: Amount.fromSat(fromSat: 4200))
98+
ScriptAmount(script: recipient1.scriptPubkey(), amount: Amount.fromSat(satoshi: 4200)),
99+
ScriptAmount(script: recipient2.scriptPubkey(), amount: Amount.fromSat(satoshi: 4200))
100100
]
101101

102102
let psbt: Psbt = try TxBuilder()

bdk-swift/Tests/BitcoinDevKitTests/LiveWalletTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ final class LiveWalletTests: XCTestCase {
9797
let recipient: Address = try Address(address: "tb1qrnfslnrve9uncz9pzpvf83k3ukz22ljgees989", network: .signet)
9898
let psbt: Psbt = try
9999
TxBuilder()
100-
.addRecipient(script: recipient.scriptPubkey(), amount: Amount.fromSat(fromSat: 4200))
100+
.addRecipient(script: recipient.scriptPubkey(), amount: Amount.fromSat(satoshi: 4200))
101101
.feeRate(feeRate: FeeRate.fromSatPerVb(satVb: 2))
102102
.finish(wallet: wallet)
103103

0 commit comments

Comments
 (0)