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

Commit

Permalink
Merge branch 'develop' into feature/IOS-5237-vechain-blockchain-basic…
Browse files Browse the repository at this point in the history
…-implementation
  • Loading branch information
m3g0byt3 committed Dec 19, 2023
2 parents fe915f5 + 06add39 commit 578e39f
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 3 deletions.
82 changes: 80 additions & 2 deletions BlockchainSdk/Common/Blockchain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,6 @@ extension Blockchain {

@available(iOS 13.0, *)
extension Blockchain {

var assembly: WalletManagerAssembly {
switch self {
case .bitcoin:
Expand Down Expand Up @@ -974,5 +973,84 @@ extension Blockchain {
return VeChainWalletAssembly()
}
}

}

// MARK: - Placeholder address

@available(iOS 13.0, *)
extension Blockchain {
/// Use this address for estimated fee
/// DO NOT send any amounts to this address!!
/// https://www.notion.so/tangem/Express-Address-for-fee-calculations-53678a61de674eba9af6b166f23175fe
var estimationFeeAddress: String {
switch self {

Check failure on line 986 in BlockchainSdk/Common/Blockchain.swift

View workflow job for this annotation

GitHub Actions / Test

switch must be exhaustive

Check failure on line 986 in BlockchainSdk/Common/Blockchain.swift

View workflow job for this annotation

GitHub Actions / Test

switch must be exhaustive
case .bitcoin:
return "bc1qwff8ryfujqukhyjcqghs68j3ph948pwcpx24d8"
case .litecoin:
return "ltc1qtcl2c7mnld8pk7kjyef9gd2d7hxxz9wqh6ylef"
case .stellar:
return "GAYK3NFZTAJQCLKGEDBRFQWMMY34MGO3PA6X3RX66XVZTCVE47A4SEK6"
case .ethereum,
.ethereumPoW,
.ethereumFair,
.rsk,
.bsc,
.polygon,
.avalanche,
.fantom,
.arbitrum,
.gnosis,
.saltPay,
.cronos,
.telos,
.octa,
.optimism,
.kava:
return "0xB62553026e1727cEE953868400C9AA20f96AA6fB"
case .ethereumClassic:
return "0xB835e3DBc99b7C7B232d3a4b6924C30Cf9813766"
case .bitcoinCash:
return "bitcoincash:qz42lpts8hsvf00r2wd2et6dandw9n8hmucl67puqg"
case .binance:
return "bnb1nhzmtee445kyf78a243pxacp85q866gdw74xar"
case .cardano:
return "addr1q9svm389hgtksjvawpt9nfd9twk4kfckhs23wxrdfspynw9g3emv6k6njzwqvdmtff4426vy2pfg0ngu9t6pr9xmd0ass48agt"
case .xrp:
return "rqVUVDZoBL1RN1E8sRMJXNy2baQ4p1Ekm"
case .ducatus:
return ""
case .tezos:
return "tz1T2BYR5vzmtrub9qhXzjBj7XFkTeXhHJ8R"
case .dogecoin:
return "DDL1UEGQwdcKxqD1juYhW8AgJaXhEZMY3C"
case .solana:
return "AEtkrvuucZhDbbdw4HPwad1w3dcuh9r3eVVS3GCDaHYX"
case .polkadot:
return "1mRpHu2zGPsugVJxrz41FMxopVWSn5s6HMepk3DitrP1cMf"
case .kusama:
return "Eh1V6Lqzd49RahV9ssZ6LTEvcDkWSnr53D1feYEZpM2Kdv3"
case .azero:
return "5HqqS1sYV19pP6jGVNyowBcPWvoyaJCQpwgyWDaNQaFNb93g"
case .tron:
return "TAFqkNfz3escPSdhogPX8nqDY4Rxzxv5v3"
case .dash:
return "XcN7YdKmSshcFSkL5vjJfnWUhnH2Uxqbm4"
case .ton:
return "EQCQsD3nAYO4agXyaiqVa3v0CA4K4nTdSRMJZw24ZFRQmBWT"
case .kaspa:
return "kaspa:qypwj0zh73z276kufh3u9fv8vpjcc8h4tt356hc9pzvnykxxxr32yycwqedqmt0"
case .ravencoin:
return "RCNTqArDCW57hBHrYKYdKNVs17PbpS9qN6"
case .cosmos:
return "cosmos158672lrar4kmsp29r0xw9suywp3snsgwe2gpym"
case .terraV1, .terraV2:
return "terra1frj93e573hlw7qfdln0r5ms74kudnlfvmwv0n5"
case .chia:
return "xch1zedrwdnv9jdt0an007pgk8wxjhvkveqnrxc003mceu2prt0hxknqtmggeu"
case .near:
return "e6ca3ee691ed78d47cffd38ecc04f1e80ef07b7908be7fc5fa5f2e5f25a0a3d8"
case .decimal:
return "d01kcj4xqnwzunua62ns6zqpjd2yruk4fhm9k8xj4"
}
}
}
2 changes: 1 addition & 1 deletion BlockchainSdk/Common/WalletManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public protocol TransactionFeeProvider {
@available(iOS 13.0, *)
public extension TransactionFeeProvider where Self: WalletProvider {
func estimatedFee(amount: Amount) -> AnyPublisher<[Fee], Error> {
getFee(amount: amount, destination: wallet.address)
getFee(amount: amount, destination: wallet.blockchain.estimationFeeAddress)
}
}

Expand Down

0 comments on commit 578e39f

Please sign in to comment.