Add topups to payouts (#6187)

This commit is contained in:
Nicolas Dorier
2024-09-02 18:37:39 +09:00
committed by GitHub
parent b49f6c3f86
commit 4a94074595
6 changed files with 109 additions and 6 deletions

View File

@@ -7,6 +7,7 @@ UPDATE "Payouts" SET
"Currency" = split_part("PayoutMethodId", '_', 1),
"PayoutMethodId"=
CASE
WHEN ("Blob"->>'Amount')::NUMERIC < 0 THEN 'TOPUP'
WHEN split_part("PayoutMethodId", '_', 2) = 'LightningLike' THEN split_part("PayoutMethodId", '_', 1) || '-LN'
ELSE split_part("PayoutMethodId", '_', 1) || '-CHAIN'
END;