CoiniumServ icon indicating copy to clipboard operation
CoiniumServ copied to clipboard

[Error] [PaymentProcessor] An error occurred while trying to execute payment; "Account has insufficient funds"

Open jeong760 opened this issue 6 years ago • 2 comments

@bonesoul

How I get a pool wallet balance instead get a balance from "" I found that IDaemon defined a Getblance from "" instead defined pool wallet, which caused an issue that "Account has insufficient funds" error by the payment processor.

The errors Error] [PaymentProcessor] An error occurred while trying to execute payment; "Account has insufficient funds"

The related code seems here and paymentprocessor.cs.

IDaemonClient.cs decimal GetBalance(string account = "");

DaemonClients.cs ///

/// If [account] is not specified, returns the server's total available balance. /// If [account] is specified, returns the balance in the account. /// /// The account to get the balance for. /// The balance of the account or the total wallet. public decimal GetBalance(string account = "") { return string.IsNullOrEmpty(account) ? MakeRequest("getbalance", EmptyString) : MakeRequest("getbalance", account); }

Regards, John Ahn

jeong760 avatar Mar 30 '18 13:03 jeong760

@jeong760

That function simply initializes and sets the expected param account to null if nothing is passed to it when called. It allows the function to run it's course properly if account is not set, which when called would be passed null. That function is proper, The account value that is passed to it is either the wallet address set in pool config or the default wallet address, which will be obtained, if useDefaultAccount is set in coin config.

flyx2888 avatar Apr 17 '18 22:04 flyx2888