-
Notifications
You must be signed in to change notification settings - Fork 9
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-7619 [Staking] MATIC token in Ethereum #853
Conversation
BlockchainSdk/Blockchains/Ethereum/EthereumTransactionBuilder.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Что-то не то, зачем вообще эти изменения? Лучше особо не стало и потребует огромного регресса
BlockchainSdk/Blockchains/Ethereum/EthereumTransactionBuilder.swift
Outdated
Show resolved
Hide resolved
BlockchainSdk/Blockchains/Ethereum/EthereumStakeKitTransactionHelper.swift
Show resolved
Hide resolved
BlockchainSdk/Blockchains/Ethereum/EthereumStakeKitTransactionHelper.swift
Show resolved
Hide resolved
BlockchainSdk/Blockchains/Ethereum/EthereumStakeKitTransactionHelper.swift
Outdated
Show resolved
Hide resolved
BlockchainSdk/Blockchains/Ethereum/EthereumTransactionBuilder.swift
Outdated
Show resolved
Hide resolved
@@ -78,19 +83,28 @@ class EthereumTransactionBuilder { | |||
return method.data | |||
} | |||
|
|||
func buildSigningInput(destination: DestinationType, fee: Fee, parameters: EthereumTransactionParams) throws -> EthereumSigningInput { | |||
guard let nonce = parameters.nonce, nonce >= 0 else { | |||
func buildSigningInput(destination: String, coinAmount: BigUInt, fee: Fee, nonce: Int?, data: Data?) throws -> EthereumSigningInput { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
так а нонс не нужен тут опциональный
@@ -209,35 +194,38 @@ private extension EthereumTransactionBuilder { | |||
throw EthereumTransactionBuilderError.invalidAmount | |||
} | |||
|
|||
let parameters = transaction.params as? EthereumTransactionParams ?? .empty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
лучше оставить как было throw EthereumTransactionBuilderError.feeParametersNotFound
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут не сосем feeParametersNotFound
по этому добавил еще один тип ошибки
@@ -209,35 +194,38 @@ private extension EthereumTransactionBuilder { | |||
throw EthereumTransactionBuilderError.invalidAmount | |||
} | |||
|
|||
let parameters = transaction.params as? EthereumTransactionParams ?? .empty | |||
let nonce = parameters.nonce |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а нонс тут развернуть тогда тоже
8743688
to
48d08ad
Compare
@@ -22,8 +22,4 @@ extension EthereumTransactionParams { | |||
func with(nonce: Int) -> EthereumTransactionParams { | |||
EthereumTransactionParams(data: data, nonce: nonce) | |||
} | |||
|
|||
static var empty: EthereumTransactionParams { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не используется, да и не нужны такие пустые параметры
Проверил