fix(mining): 修复 ShareAmount 类型调用方式
使用 .value.toNumber() 而非 .toNumber() Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
4f1f1f9eaf
commit
4eb466230e
|
|
@ -58,10 +58,10 @@ export class GetMiningAccountQuery {
|
|||
this.accountRepository.getTotalContribution(),
|
||||
]);
|
||||
|
||||
if (config && totalContribution.toNumber() > 0) {
|
||||
const userContribution = account.totalContribution.toNumber();
|
||||
const secondDistribution = config.secondDistribution.toNumber();
|
||||
const ratio = userContribution / totalContribution.toNumber();
|
||||
if (config && totalContribution.value.toNumber() > 0) {
|
||||
const userContribution = account.totalContribution.value.toNumber();
|
||||
const secondDistribution = config.secondDistribution.value.toNumber();
|
||||
const ratio = userContribution / totalContribution.value.toNumber();
|
||||
perSecondEarning = (ratio * secondDistribution).toFixed(8);
|
||||
}
|
||||
} catch {
|
||||
|
|
|
|||
Loading…
Reference in New Issue