-
Notifications
You must be signed in to change notification settings - Fork 10
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
AND-9337, AND-9340, AND-9341, AND-9348, AND-9349, AND-9350, AND-9364: Fix KRC-20 issues #855
Conversation
7fc12bf
to
4b8dcad
Compare
|
||
if (change < BigDecimal.ZERO) { // unspentsToSpend not enough to cover transaction amount |
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.
а куда уехала эта логика с max 84 utxo?
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.
Проверка на utxo есть в checkUtxoAmountLimit()
, логику этого метода обновил
a172aee
to
a15cfaf
Compare
@@ -10,7 +10,7 @@ interface UtxoAmountLimitProvider { | |||
/** | |||
* Checks if [amount] and [fee] is not greater than utxo limit. Returns limit otherwise. | |||
*/ | |||
fun checkUtxoAmountLimit(amount: BigDecimal, fee: BigDecimal): UtxoAmountLimit? | |||
fun checkUtxoAmountLimit(amount: BigDecimal, fee: BigDecimal, currencyType: CryptoCurrencyType): UtxoAmountLimit? |
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.
Эта функция для KRC20 токенов не имеет смысла.
CryptoCurrencyType - это вообще какая-то фигня, есть же AmountType, если нужно отдельный кейс только для токенов и коинов, то надо бы вложенный сделать, но никак не отдельный. Надо убрать это в принципе.
А есть какая-то причина для этого интерфейса вообще? Чем нас validateTransaction не устраивает?
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.
Ревертнул, в приложении сделаю так, чтобы для токенов проверки не было
is Result.Success -> { | ||
transactionBuilder.unspentOutputs = balanceResponse.data.unspentOutputs | ||
} | ||
is Result.Failure -> Unit |
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.
successOr лаконичнее будет
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.
Заменил на map
… Fix KRC-20 issues
a15cfaf
to
0172c0d
Compare
No description provided.