File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed
node/common/src/service/rpc Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -31,14 +31,18 @@ impl Ledger {
31
31
pub fn new ( sender : RpcSender ) -> Self {
32
32
Self { sender }
33
33
}
34
+ }
34
35
36
+ #[ cfg_attr( target_family = "wasm" , wasm_bindgen) ]
37
+ impl Ledger {
35
38
pub fn latest ( & self ) -> LedgerSelected {
36
39
LedgerSelected {
37
40
sender : self . sender . clone ( ) ,
38
41
}
39
42
}
40
43
}
41
44
45
+ #[ cfg_attr( target_family = "wasm" , wasm_bindgen) ]
42
46
impl LedgerSelected {
43
47
pub fn accounts ( & self ) -> LedgerAccounts {
44
48
LedgerAccounts {
Original file line number Diff line number Diff line change @@ -26,19 +26,22 @@ impl TransactionPool {
26
26
Self { sender }
27
27
}
28
28
29
- pub fn inject ( & self ) -> TransactionPoolInject {
30
- TransactionPoolInject {
31
- sender : self . sender . clone ( ) ,
32
- }
33
- }
34
-
35
29
async fn _get ( & self ) -> Option < RpcTransactionPoolResponse > {
36
30
self . sender
37
31
. oneshot_request ( RpcRequest :: TransactionPoolGet )
38
32
. await
39
33
}
40
34
}
41
35
36
+ #[ cfg_attr( target_family = "wasm" , wasm_bindgen) ]
37
+ impl TransactionPool {
38
+ pub fn inject ( & self ) -> TransactionPoolInject {
39
+ TransactionPoolInject {
40
+ sender : self . sender . clone ( ) ,
41
+ }
42
+ }
43
+ }
44
+
42
45
#[ cfg( not( target_family = "wasm" ) ) ]
43
46
impl TransactionPool {
44
47
pub async fn get ( & self ) -> Option < RpcTransactionPoolResponse > {
Original file line number Diff line number Diff line change @@ -24,7 +24,10 @@ impl TransitionFrontier {
24
24
pub fn new ( sender : RpcSender ) -> Self {
25
25
Self { sender }
26
26
}
27
+ }
27
28
29
+ #[ cfg_attr( target_family = "wasm" , wasm_bindgen) ]
30
+ impl TransitionFrontier {
28
31
pub fn best_chain ( & self ) -> TransitionFrontierBestChain {
29
32
TransitionFrontierBestChain {
30
33
sender : self . sender . clone ( ) ,
You can’t perform that action at this time.
0 commit comments