From 46d5e1c5b4c53bbeb3594d8723dc8305865b55c2 Mon Sep 17 00:00:00 2001 From: ERussel Date: Tue, 19 Nov 2024 19:02:22 +0100 Subject: [PATCH] refactoring --- Podfile | 6 +++--- Podfile.lock | 8 ++++---- .../RelayChain/PolkadotRewardParamsService.swift | 11 ++++------- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Podfile b/Podfile index 2e2942f10..de248ae79 100644 --- a/Podfile +++ b/Podfile @@ -5,7 +5,7 @@ abstract_target 'novawalletAll' do use_frameworks! pod 'DSF_QRCode', '~> 18.0.0' - pod 'SubstrateSdk', :git => 'https://github.com/nova-wallet/substrate-sdk-ios.git', :commit => 'f55b0e60b1061744490ca7ce06af8c4b7ef8ddae' + pod 'SubstrateSdk', :git => 'https://github.com/nova-wallet/substrate-sdk-ios.git', :tag => '3.4.0' pod 'SwiftLint' pod 'R.swift', :inhibit_warnings => true pod 'SoraKeystore', '~> 1.0.0' @@ -40,7 +40,7 @@ abstract_target 'novawalletAll' do inherit! :search_paths pod 'Cuckoo' - pod 'SubstrateSdk', :git => 'https://github.com/nova-wallet/substrate-sdk-ios.git', :commit => 'f55b0e60b1061744490ca7ce06af8c4b7ef8ddae' + pod 'SubstrateSdk', :git => 'https://github.com/nova-wallet/substrate-sdk-ios.git', :tag => '3.4.0' pod 'SoraFoundation', :git => 'https://github.com/ERussel/Foundation-iOS.git', :tag => '1.1.0' pod 'R.swift', :inhibit_warnings => true pod 'FireMock', :inhibit_warnings => true @@ -67,7 +67,7 @@ abstract_target 'novawalletAll' do pod 'SoraKeystore', '~> 1.0.0' pod 'Operation-iOS', :git => 'https://github.com/novasamatech/Operation-iOS', :tag => '2.0.1' pod 'Sourcery', '~> 1.4' - pod 'SubstrateSdk', :git => 'https://github.com/nova-wallet/substrate-sdk-ios.git', :commit => 'f55b0e60b1061744490ca7ce06af8c4b7ef8ddae' + pod 'SubstrateSdk', :git => 'https://github.com/nova-wallet/substrate-sdk-ios.git', :tag => '3.4.0' pod 'SwiftyBeaver' pod 'IrohaCrypto', :git => 'https://github.com/novasamatech/IrohaCrypto', :tag => '0.9.1' pod 'secp256k1.c', :git => 'https://github.com/novasamatech/secp256k1.c', :tag => '0.1.3' diff --git a/Podfile.lock b/Podfile.lock index e0d5f0a54..96840216a 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1554,7 +1554,7 @@ DEPENDENCIES: - SoraUI (from `https://github.com/ERussel/UIkit-iOS.git`, tag `1.13.0`) - Sourcery (~> 1.4) - Starscream (from `https://github.com/novasamatech/Starscream.git`, tag `4.0.12`) - - SubstrateSdk (from `https://github.com/nova-wallet/substrate-sdk-ios.git`, commit `f55b0e60b1061744490ca7ce06af8c4b7ef8ddae`) + - SubstrateSdk (from `https://github.com/nova-wallet/substrate-sdk-ios.git`, tag `3.4.0`) - SwiftAlgorithms (~> 1.0.0) - SwiftDraw (~> 0.18.0) - SwiftFormat/CLI (~> 0.47.13) @@ -1650,8 +1650,8 @@ EXTERNAL SOURCES: :git: https://github.com/novasamatech/Starscream.git :tag: 4.0.12 SubstrateSdk: - :commit: f55b0e60b1061744490ca7ce06af8c4b7ef8ddae :git: https://github.com/nova-wallet/substrate-sdk-ios.git + :tag: 3.4.0 SwiftRLP: :git: https://github.com/ERussel/SwiftRLP.git WalletConnectSwiftV2: @@ -1693,8 +1693,8 @@ CHECKOUT OPTIONS: :git: https://github.com/novasamatech/Starscream.git :tag: 4.0.12 SubstrateSdk: - :commit: f55b0e60b1061744490ca7ce06af8c4b7ef8ddae :git: https://github.com/nova-wallet/substrate-sdk-ios.git + :tag: 3.4.0 SwiftRLP: :commit: 809e68a002d19ee3d8bbeb72577224b7513e7e8e :git: https://github.com/ERussel/SwiftRLP.git @@ -1771,6 +1771,6 @@ SPEC CHECKSUMS: ZMarkupParser: a92d31ba40695b790f1da5fec98c3d4505341aff ZNSTextAttachment: 1ddd53660a8d3c42dbb716bf6866ffce22c44181 -PODFILE CHECKSUM: 9a9365572f6552b89345ff8d6b25451f2989f6aa +PODFILE CHECKSUM: f485e2dc6e10abfdd79cae68f47ca4679c0cd84f COCOAPODS: 1.15.2 diff --git a/novawallet/Modules/Staking/Services/RewardCalculatorService/RelayChain/PolkadotRewardParamsService.swift b/novawallet/Modules/Staking/Services/RewardCalculatorService/RelayChain/PolkadotRewardParamsService.swift index 6557194c0..745a15c5f 100644 --- a/novawallet/Modules/Staking/Services/RewardCalculatorService/RelayChain/PolkadotRewardParamsService.swift +++ b/novawallet/Modules/Staking/Services/RewardCalculatorService/RelayChain/PolkadotRewardParamsService.swift @@ -52,22 +52,19 @@ final class PolkadotRewardParamsService: BaseSyncService { ) { let codingFactory = try codingFactoryOperation.extractNoCancellableResultData() - let apiName = "Inflation" - let methodName = "experimental_inflation_prediction_info" - guard let runtimeApi = codingFactory.metadata.getRuntimeApiMethod( - for: apiName, - methodName: methodName + for: "Inflation", + methodName: "experimental_inflation_prediction_info" ) else { throw PolkadotRewardParamsServiceError.runtimeApiNotFound } return self.stateCallFactory.createWrapper( - for: "Inflation_experimental_inflation_prediction_info", + for: runtimeApi.callName, paramsClosure: nil, codingFactoryClosure: { codingFactory }, connection: self.connection, - queryType: String(runtimeApi.output) + queryType: String(runtimeApi.method.output) ) }