File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ license = "MIT"
8
8
9
9
[dependencies ]
10
10
base64 = " 0.12.3"
11
- bitcoin = { version = " 0.28 " , features = [" use- serde" ] }
12
- bitcoincore-rpc-json = " 0.15 "
11
+ bitcoin = { version = " 0.29 " , features = [" serde" ] }
12
+ bitcoincore-rpc-json = " 0.16 "
13
13
futures = " 0.3.5"
14
14
hex = " 0.4.2"
15
15
jsonrpc_client = { version = " 0.7" , features = [" reqwest" ] }
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ impl Client {
79
79
) -> Result < Txid > {
80
80
let txid = self
81
81
. with_wallet ( wallet_name) ?
82
- . sendtoaddress ( address, amount. as_btc ( ) )
82
+ . sendtoaddress ( address, amount. to_btc ( ) )
83
83
. await ?;
84
84
let txid = Txid :: from_hex ( & txid) ?;
85
85
@@ -131,7 +131,7 @@ impl Client {
131
131
amount : Amount ,
132
132
) -> Result < String > {
133
133
let mut outputs_converted = HashMap :: new ( ) ;
134
- outputs_converted. insert ( address. to_string ( ) , amount. as_btc ( ) ) ;
134
+ outputs_converted. insert ( address. to_string ( ) , amount. to_btc ( ) ) ;
135
135
let psbt = self
136
136
. with_wallet ( wallet_name) ?
137
137
. walletcreatefundedpsbt ( inputs, outputs_converted)
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ impl Wallet {
83
83
let txid = self
84
84
. client
85
85
. with_wallet ( & self . name ) ?
86
- . sendtoaddress ( address, amount. as_btc ( ) )
86
+ . sendtoaddress ( address, amount. to_btc ( ) )
87
87
. await ?;
88
88
let txid = Txid :: from_hex ( & txid) ?;
89
89
@@ -241,7 +241,7 @@ mod test {
241
241
} ) ;
242
242
// add shared output with twice the btc to fit change addresses
243
243
outputs. push ( TxOut {
244
- value : Amount :: from_btc ( 2.0 ) . unwrap ( ) . as_sat ( ) ,
244
+ value : Amount :: from_btc ( 2.0 ) . unwrap ( ) . to_sat ( ) ,
245
245
script_pubkey : joined_address. clone ( ) . script_pubkey ( ) ,
246
246
} ) ;
247
247
You can’t perform that action at this time.
0 commit comments