File tree 3 files changed +12
-16
lines changed
Adamant/Modules/Wallets/Lisk
3 files changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -49,16 +49,16 @@ class LskApiCore: BlockchainHealthCheckableService {
49
49
func getStatusInfo( node: CommonKit . Node ) async -> WalletServiceResult < NodeStatusInfo > {
50
50
let startTimestamp = Date . now. timeIntervalSince1970
51
51
52
- return await request ( node: node) { client, completion in
53
- LiskKit . Node ( client: client) . info { completion ( $0 ) }
52
+ return await request ( node: node) { client in
53
+ try await LiskKit . Node ( client: client) . info ( )
54
54
} . map { model in
55
- . init(
56
- ping: Date . now. timeIntervalSince1970 - startTimestamp,
57
- height: model. data . height ?? . zero,
58
- wsEnabled: false ,
59
- wsPort: nil ,
60
- version: nil
61
- )
55
+ . init(
56
+ ping: Date . now. timeIntervalSince1970 - startTimestamp,
57
+ height: model. height ?? . zero,
58
+ wsEnabled: false ,
59
+ wsPort: nil ,
60
+ version: nil
61
+ )
62
62
}
63
63
}
64
64
}
Original file line number Diff line number Diff line change @@ -33,11 +33,7 @@ extension Node {
33
33
extension Node {
34
34
35
35
/// Retrieve the status of a Lisk Node
36
- public func status( completionHandler: @escaping ( Response < NodeStatusResponse > ) -> Void ) {
37
- client. get ( path: " node/status " , completionHandler: completionHandler)
38
- }
39
-
40
- public func info( completionHandler: @escaping ( Response < NodeInfoResponse > ) -> Void ) {
41
- client. get ( path: " node/info " , completionHandler: completionHandler)
36
+ public func info( ) async throws -> NodeInfoModel {
37
+ try await client. request ( method: " system_getNodeInfo " , params: [ : ] )
42
38
}
43
39
}
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public struct Service: APIService {
35
35
extension Service {
36
36
37
37
public func getFees( completionHandler: @escaping ( Response < ServiceFeeResponse > ) -> Void ) {
38
- client. get ( path: " \( Version . v2 . rawValue) /fees " , completionHandler: completionHandler)
38
+ client. get ( path: " \( Version . v3 . rawValue) /fees " , completionHandler: completionHandler)
39
39
}
40
40
41
41
public func exist( address: String , completionHandler: @escaping ( Response < ExistModel > ) -> Void ) {
You can’t perform that action at this time.
0 commit comments