Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/xdnw/locutus
Browse files Browse the repository at this point in the history
  • Loading branch information
xdnw committed May 11, 2024
2 parents f18aea8 + bcb968e commit d3e29ce
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -981,10 +981,13 @@ public TransferResult transferFromNationAccountWithRoleChecks(Supplier<Map<Long,
for (int i = 0; i < amount.length; i++) {
balance[i] += amount[i];
}
if (!isInternalTransfer && !depositType.isIgnored()) {
if (nationAccount == null) nationAccount = receiver.asNation();
senderDB.subtractBalance(timestamp, nationAccount, bankerNation.getNation_id(), note, amount);
}
senderDB.setEscrowed(receiver.asNation(), balance, escrowDate);
}
// result = Map.entry(TransferStatus.SUCCESS, "Escrowed `" + PW.resourcesToString(amount) + "` for " + receiver.getName() + ". use " + CM.escrow.withdraw.cmd.toSlashMention() + " to withdraw.");
isInternalTransfer = true;
result = new TransferResult(TransferStatus.SUCCESS, receiver, amount, ingameNote)
.addMessage("Escrowed `" + ResourceType.resourcesToString(amount) + "` for " + receiver.getMarkdownUrl(),
"Use " + CM.escrow.withdraw.cmd.toSlashMention() + " to withdraw.");
Expand Down

0 comments on commit d3e29ce

Please sign in to comment.