Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS-8316 [Casper] Make blockchain implementation #4141

Open
wants to merge 19 commits into
base: blockchains/casper/IOS-8332_make_casper_address_service
Choose a base branch
from

Conversation

skibinalexander
Copy link
Contributor

@skibinalexander skibinalexander commented Oct 31, 2024

Дополнение реализации каспера. Получение баланса по кошельку

После #4140

…s_service' into blockchains/casper/IOS-8316_make_blockchain_implementation

# Conflicts:
#	BlockchainSdk/Blockchains/Casper/Network/CasperTarget.swift
#	TangemApp.xcodeproj/project.pbxproj
…s_service' into blockchains/casper/IOS-8316_make_blockchain_implementation

# Conflicts:
#	BlockchainSdk/Blockchains/Casper/Network/CasperNetworkProvider.swift
#	TangemApp.xcworkspace/xcshareddata/swiftpm/Package.resolved
…' into blockchains/casper/IOS-8316_make_blockchain_implementation
…' into blockchains/casper/IOS-8316_make_blockchain_implementation
…' into blockchains/casper/IOS-8316_make_blockchain_implementation
…' into blockchains/casper/IOS-8316_make_blockchain_implementation
…' into blockchains/casper/IOS-8316_make_blockchain_implementation
…' into blockchains/casper/IOS-8316_make_blockchain_implementation

# Conflicts:
#	BlockchainSdk/Blockchains/Casper/Network/CasperNetworkProvider.swift
#	TangemApp.xcodeproj/project.pbxproj
…' into blockchains/casper/IOS-8316_make_blockchain_implementation

# Conflicts:
#	BlockchainSdk/Common/Blockchain.swift
…' into blockchains/casper/IOS-8316_make_blockchain_implementation
…' into blockchains/casper/IOS-8316_make_blockchain_implementation

# Conflicts:
#	BlockchainSdk/Blockchains/Casper/Network/CasperNetworkProvider.swift
#	BlockchainSdk/Blockchains/Casper/Network/CasperTarget.swift
#	TangemApp.xcodeproj/project.pbxproj

/// Why `Localization`?
/// https://en.wikipedia.org/wiki/Internationalization_and_localization
internal enum Localization {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Что - то лишнее попало уберу ...

Copy link
Contributor

Choose a reason for hiding this comment

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

Вообще все это есть в гитигноре вроде как

# Generated
Tangem/Resources/Generated/**.swift
BlockchainSdk/Resources/Generated/**.swift

@skibinalexander skibinalexander marked this pull request as ready for review November 5, 2024 09:34
@skibinalexander skibinalexander requested review from tureck1y and a team as code owners November 5, 2024 09:34
@skibinalexander skibinalexander requested review from m3g0byt3 and Vyachesl0ve and removed request for a team November 5, 2024 09:34
…' into blockchains/casper/IOS-8316_make_blockchain_implementation
…' into blockchains/casper/IOS-8316_make_blockchain_implementation

extension CasperWalletManager {
enum Constants {
static let constantFeeValue = Decimal(stringValue: "0.1")
Copy link
Contributor

Choose a reason for hiding this comment

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

Это юзается где-то? Нужна видимость internal?

// MARK: - Private Implementation

private func updateWallet(balanceInfo: CasperBalance) {
if balanceInfo.value != wallet.amounts[.coin]?.value {
Copy link
Contributor

Choose a reason for hiding this comment

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

Опять этот метод убирания пендингов
Получения инфы по хешу транзы опять чтоль нету у этой сетки?

import Foundation

extension CasperNetworkResponse {
/// The balance represented in motes.
Copy link
Contributor

Choose a reason for hiding this comment

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

А что это? Наименьшая атомарная единица?

encoder.keyEncodingStrategy = .convertToSnakeCase

return .requestJSONRPC(
id: Constants.jsonRPCMethodId,
Copy link
Contributor

Choose a reason for hiding this comment

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

id лучше глобально инкрементить (со есть хранить в static var и инкрементить при каждом чтении), чтобы в логах было проще матчить req и resp


/// Why `Localization`?
/// https://en.wikipedia.org/wiki/Internationalization_and_localization
internal enum Localization {
Copy link
Contributor

Choose a reason for hiding this comment

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

Вообще все это есть в гитигноре вроде как

# Generated
Tangem/Resources/Generated/**.swift
BlockchainSdk/Resources/Generated/**.swift

…' into blockchains/casper/IOS-8316_make_blockchain_implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants