mirror of
https://github.com/modrinth/code.git
synced 2026-09-02 04:56:52 +00:00
schema update
This commit is contained in:
@@ -119,14 +119,23 @@ impl PayoutsQueue {
|
||||
.account_details
|
||||
.wrap_err("source account does not have details")?;
|
||||
let available = details
|
||||
.balances
|
||||
.balances_v2
|
||||
.iter()
|
||||
.map(|balance| {
|
||||
if balance.token_symbol == muralpay::USDC {
|
||||
balance.token_amount
|
||||
} else {
|
||||
Decimal::ZERO
|
||||
.map(|balance| match balance {
|
||||
muralpay::Balance::Blockchain {
|
||||
token_symbol,
|
||||
exponent,
|
||||
value,
|
||||
..
|
||||
} if token_symbol == muralpay::USDC => {
|
||||
*value * Decimal::new(1, *exponent)
|
||||
}
|
||||
muralpay::Balance::Fiat {
|
||||
currency_symbol: muralpay::UsdSymbol::Usd,
|
||||
exponent,
|
||||
value,
|
||||
} => *value * Decimal::new(1, *exponent),
|
||||
_ => Decimal::ZERO,
|
||||
})
|
||||
.sum::<Decimal>();
|
||||
Ok(AccountBalance {
|
||||
|
||||
Reference in New Issue
Block a user