Skip to content

Commit

Permalink
Update ICPBlock.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantinos Gaitanis committed Oct 14, 2024
1 parent 6410502 commit 787a13e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Sources/IcpKit/Models/ICPBlock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ public struct ICPBlock {
}

public var fee: UInt64? {
guard case .transfer(_,_,_, let fee, _) = self else { return nil }
return fee
switch self {
case .approve(_,_,_, let fee, _,_),
.transfer(_,_,_, let fee, _):
return fee
default: return nil
}
}
}
}
Expand Down

0 comments on commit 787a13e

Please sign in to comment.