Skip to content

Commit

Permalink
ABW-1947: Increase fee (#641)
Browse files Browse the repository at this point in the history
Co-authored-by: rvelaz <raul.velaz@rdx.works>
Co-authored-by: Ghenadie Vasiliev-Pusca <ghenadie.vasiliev-pusca@rdx.works>
  • Loading branch information
3 people committed Jul 24, 2023
1 parent 4828e9b commit 6dc7331
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions Sources/EngineKit/ManifestBuilder.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import EngineToolkit
import Prelude

// MARK: - Mutation

Expand All @@ -12,7 +13,7 @@ extension TransactionManifest {

public func withLockFeeCallMethodAdded(
address: Address,
fee: String = "10"
fee: BigDecimal = .temporaryStandardFee
) throws -> TransactionManifest {
try withInstructionAdded(
.lockFeeCall(address: address, fee: fee),
Expand Down Expand Up @@ -86,7 +87,7 @@ extension Instructions {

public func withLockFeeCallMethodAdded(
address: Address,
fee: String = "10"
fee: BigDecimal = .temporaryStandardFee
) throws -> Instructions {
try withInstructionAdded(
.lockFeeCall(address: address, fee: fee),
Expand Down Expand Up @@ -163,9 +164,9 @@ extension Instructions {
extension Instruction {
static func lockFeeCall(
address: Address,
fee: String = "10"
fee: BigDecimal
) throws -> Instruction {
try .callMethod(address: .static(value: .init(address: address.address)), methodName: "lock_fee", args: .tupleValue(fields: [.decimalValue(value: .init(value: fee))]))
try .callMethod(address: .static(value: .init(address: address.address)), methodName: "lock_fee", args: .tupleValue(fields: [.decimalValue(value: .init(value: fee.toString()))]))
}

static func depositBatch(account: AccountAddress) -> String {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Prelude/Extensions/BigDecimal+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Foundation

extension BigDecimal {
// FIXME: This should not be used once we can get the actual fees
public static let temporaryStandardFee: BigDecimal = 10
public static let temporaryStandardFee: BigDecimal = 25
}

extension BigDecimal {
Expand Down

0 comments on commit 6dc7331

Please sign in to comment.