Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

IOS-7578: Fix BSDK warnings #794

Merged
merged 10 commits into from
Sep 6, 2024
13 changes: 7 additions & 6 deletions BlockchainSdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@ Use BlockchainSdk for Tangem wallet integration
s.source_files = 'BlockchainSdk/**/*'

s.resource_bundles = {
'BlockchainSdk' => [
'BlockchainSdk/Common/Localizations/*.lproj/*.strings',
'BlockchainSdk/PrivacyInfo.xcprivacy',
]
'BlockchainSdk' => [
'BlockchainSdk/Common/Localizations/*.lproj/*.strings',
'BlockchainSdk/PrivacyInfo.xcprivacy',
]
}

s.exclude_files = 'BlockchainSdk/Blockchains/XRP/XRPKit/README.md',
'BlockchainSdk/Blockchains/XRP/XRPKit/LICENSE',
'BlockchainSdk/Blockchains/Tron/protobuf/Tron Protobuf.md',
'BlockchainSdk/Blockchains/Tron/protobuf/Contracts.proto',
'BlockchainSdk/Blockchains/Tron/protobuf/Tron.proto'
'BlockchainSdk/Blockchains/Tron/protobuf/*.proto',
'BlockchainSdk/Blockchains/Koinos/protobuf/*.proto',
'BlockchainSdk/PrivacyInfo.xcprivacy'

# 'Hedera SDK' dependency must be added via SPM
# 'CryptoSwift' dependency must be added via SPM
Expand Down
8 changes: 0 additions & 8 deletions BlockchainSdk.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -574,10 +574,6 @@
DAE30DFD279164500056C5A3 /* SolanaAddressService.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAE30DF9279164500056C5A3 /* SolanaAddressService.swift */; };
DAE30DFF279164500056C5A3 /* SolanaWalletManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAE30DFA279164500056C5A3 /* SolanaWalletManager.swift */; };
DAE343C62BF36329001B3F38 /* KoinosAddressTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAE343C52BF36329001B3F38 /* KoinosAddressTests.swift */; };
DAE657D92BFC71A600D7D63A /* options.proto in Sources */ = {isa = PBXBuildFile; fileRef = DAE657D82BFC71A600D7D63A /* options.proto */; };
DAE657DB2BFC71B800D7D63A /* protocol.proto in Sources */ = {isa = PBXBuildFile; fileRef = DAE657DA2BFC71B800D7D63A /* protocol.proto */; };
DAE657DD2BFC71DD00D7D63A /* token.proto in Sources */ = {isa = PBXBuildFile; fileRef = DAE657DC2BFC71DD00D7D63A /* token.proto */; };
DAE657DF2BFC71E700D7D63A /* value.proto in Sources */ = {isa = PBXBuildFile; fileRef = DAE657DE2BFC71E700D7D63A /* value.proto */; };
DAE657E42BFC732400D7D63A /* options.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAE657E02BFC732400D7D63A /* options.pb.swift */; };
DAE657E52BFC732400D7D63A /* protocol.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAE657E12BFC732400D7D63A /* protocol.pb.swift */; };
DAE657E62BFC732400D7D63A /* value.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAE657E22BFC732400D7D63A /* value.pb.swift */; };
Expand Down Expand Up @@ -5026,7 +5022,6 @@
B6B083572AE6B11C0099D6F8 /* NEARAccessKeyInfo.swift in Sources */,
B68CACCB2BF4428400E4ECFE /* HederaNetworkResult.AccountHbarBalance.swift in Sources */,
DC5E65142B1650F400E81AA5 /* OP_2DROP.swift in Sources */,
DAE657DD2BFC71DD00D7D63A /* token.proto in Sources */,
EF1339B62AB4B2A600B78BA3 /* TransferERC20TokenMethod.swift in Sources */,
B61569042B7569E1001C66DE /* HederaAccountInfo.swift in Sources */,
EF2BC62529DAD53B003D3F18 /* RavencoinWalletInfo.swift in Sources */,
Expand Down Expand Up @@ -5159,7 +5154,6 @@
EF3B19482AA85E6F0084AA1C /* ArbitrumExternalLinkProvider.swift in Sources */,
DAFE0D0A2BB1840E005CBD9C /* MantleExternalLinkProvider.swift in Sources */,
EF2D9BCF2BBAC2CA0055C485 /* TransactionFeeProvider.swift in Sources */,
DAE657D92BFC71A600D7D63A /* options.proto in Sources */,
B63068C22B3102FA00E79053 /* VeChainTransactionBuilder.swift in Sources */,
B68A7D472B35D39700822BAF /* VeChainTransactionInfo.swift in Sources */,
0AEFED0A2C3D5A5200C0F400 /* ICPNetworkProvider.swift in Sources */,
Expand Down Expand Up @@ -5244,7 +5238,6 @@
2D9A919529BB8BFF00476EA6 /* TONWalletManager.swift in Sources */,
DC5E64E92B1650F400E81AA5 /* OP_OR.swift in Sources */,
DC5E64F52B1650F400E81AA5 /* OP_ADD.swift in Sources */,
DAE657DF2BFC71E700D7D63A /* value.proto in Sources */,
5DF91519253DB7B300B927DD /* TezosAddress.swift in Sources */,
5DF91521253DB89800B927DD /* TezosTarget.swift in Sources */,
2DDEFBDD2B59B44700885675 /* AlgorandResponse+Account.swift in Sources */,
Expand Down Expand Up @@ -5455,7 +5448,6 @@
DC5E65182B1650F400E81AA5 /* OP_FROMALTSTACK.swift in Sources */,
2DDEFBE02B59B44700885675 /* AlgorandResponse+Transaction.swift in Sources */,
5DED72B8239FE2E3006D79AE /* Decimal+.swift in Sources */,
DAE657DB2BFC71B800D7D63A /* protocol.proto in Sources */,
DC5E64EB2B1650F400E81AA5 /* OP_RESERVED1.swift in Sources */,
DAE30DFB279164500056C5A3 /* SolanaDummyAccountStorage.swift in Sources */,
B6F2621E2B6D91F800B2E47B /* HederaConsensusNetworkProvider.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ extension CardanoTransactionBuilder {
return try minChange(exclude: nil)

case .token(let token):
let asset = try self.asset(for: token)
return try minChange(token: token, uint64Amount: amount.uint64Amount)

case .reserve, .feeResource:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ extension CardanoWalletManager: CardanoTransferRestrictable {
private func validateCardanoCoinWithdrawal(amount: Amount, fee: Fee) throws {
assert(!amount.type.isToken, "Only coin validation")

guard let adaBalance = wallet.amounts[.coin]?.value else {
guard wallet.amounts[.coin]?.value != nil else {
throw ValidationError.balanceNotFound
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ struct KaspaWalletAssembly: WalletManagerAssembly {
$0.txBuilder = KaspaTransactionBuilder(blockchain: input.blockchain)

let linkResolver = APINodeInfoResolver(blockchain: input.blockchain, config: input.blockchainSdkConfig)
var providers: [KaspaNetworkProvider] = input.apiInfo.compactMap {
let providers: [KaspaNetworkProvider] = input.apiInfo.compactMap {
guard let nodeInfo = linkResolver.resolve(for: $0) else {
return nil
}
Expand Down
2 changes: 0 additions & 2 deletions BlockchainSdk/Blockchains/TON/TONWalletAssembly.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ struct TONWalletAssembly: WalletManagerAssembly {
let blockchain = input.blockchain
let config = input.blockchainSdkConfig

let linkResolver = APINodeInfoResolver(blockchain: blockchain, config: config)
let apiKeyInfoProvider = APIKeysInfoProvider(blockchain: blockchain, config: config)
Comment on lines -19 to -20
Copy link
Contributor Author

@m3g0byt3 m3g0byt3 Sep 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Код не юзается
Проверил - приватная апишка тона с ключем (которая https://toncenter.com/api/v2) сейчас резолвится и работает без проблем

🟠 12:09:43:739: Response: https://toncenter.com/api/v2/jsonRPC
🟠 12:09:43:740: body: {
  "result" : {
    "account_state" : "uninitialized",
    "last_transaction_id" : {
      "@type" : "internal.transactionId",
      "hash" : "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
      "lt" : "0"
    },
    "wallet" : false,
    "balance" : 0
  },
  "id" : "CF15D329-86AB-458D-9158-EA086894BF50",
  "jsonrpc" : "2.0",
  "ok" : true
}

let providers: [TONProvider] = APIResolver(blockchain: blockchain, config: config)
.resolveProviders(apiInfos: input.apiInfo) { nodeInfo, _ in
TONProvider(node: nodeInfo, networkConfig: input.networkConfig)
Expand Down
Loading