Skip to content

Commit

Permalink
fix CalculateNetworkFee
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim8y committed May 11, 2024
1 parent 28f2d35 commit 51ea5a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/RpcServer/RpcServer.Wallet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,11 @@ protected virtual JToken CalculateNetworkFee(JArray _params)
var tx = Convert.FromBase64String(_params[0].AsString());

JObject account = new();
var networkfee = Wallets.Helper.CalculateNetworkFee(
wallet ??= new DummyWallet(system.Settings);
var networkfee =
Wallets.Helper.CalculateNetworkFee(
tx.AsSerializable<Transaction>(), system.StoreView, system.Settings,
wallet is not null ? a => wallet.GetAccount(a).Contract.Script : null);
a => wallet.GetAccount(a).Contract.Script);
account["networkfee"] = networkfee.ToString();
return account;
}
Expand Down

0 comments on commit 51ea5a2

Please sign in to comment.