Skip to content

Commit

Permalink
Update amount from double to string (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruixhuang authored and mike-dydx committed Aug 20, 2024
1 parent faf7351 commit 6fed856
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Utilities/Utilities/_Javascript/CosmoJavascript.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public final class CosmoJavascript: NSObject, SingletonProtocol {
}

public func withdrawToIBC(subaccount: Int,
amount: Double,
amount: String,
payload: String,
completion: @escaping JavascriptCompletion) {
if let data = payload.data(using: .utf8) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class dydxTransferInputCtaButtonViewPresenter: HostedViewPresenter<dydxTradeInpu
self.screen(originationAddress: originationAddress, destinationAddress: destinationAddress) { success in
guard success else { return }
guard let data = transferInput.requestPayload?.data,
let amount = self.parser.asDecimal(transferInput.size?.usdcSize)?.doubleValue else {
let amount = transferInput.size?.usdcSize, (self.parser.asDecimal(amount)?.doubleValue ?? 0) > 0.0 else {
return
}
let gasFee = transferInput.summary?.gasFee?.doubleValue ?? 0
Expand Down

0 comments on commit 6fed856

Please sign in to comment.