Skip to content

refactor(banking): update wasabi_banking API calls to include accountType and source parameters - #327

Merged
Github-Samuel merged 1 commit into
Samuels-Development:mainfrom
wasabirobby:fix/wasabi_banking
Nov 15, 2026
Merged

Github-Samuel merged 1 commit into
Samuels-Development:mainfrom
wasabirobby:fix/wasabi_banking

Conversation

@wasabirobby

@wasabirobby wasabirobby commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes the wasabi_banking integration in bridge/server/banking.lua.

The bridge used an outdated wasabi_banking export signature, so with wasabi_banking as the banking provider:

  • the Wallet app showed a $0 balance
  • phone transfers failed the balance check
  • phone transfers were never logged to the player's bank statement

Changes:

  • GetAccountBalance(id) → GetAccountBalance(id, 'bank')
  • AddMoney/RemoveMoney now use the current signature (accountType, accountID, amount, source) and return their result so try() correctly detects success
  • Removed wasabi_banking from OWN_TABLE, since wasabi_banking stores the personal bank balance on the framework account
  • After a successful move, logs a statement entry via exports.wasabi_banking:Transaction(id, reason, amount, 'deposit'|'sent', 'personal'), using the phone's existing reason text (wrapped in pcall so logging can never block a transfer)

Type of Change

  • Bug Fix
  • New Feature
  • Improvement / Refactor
  • Performance
  • Documentation
  • Compatibility
  • Other

Related Issues

None filed.

Testing

Tested on a Qbox server with the current wasabi_banking:

  • Wallet balance: showed $0 before the fix, the correct balance ($5,010) after

  • Transfer + statement-logging changes follow the same API and were reviewed against wasabi_banking's exports, but haven't been run end-to-end in a live transfer yet

  • Tested locally

  • Tested with latest sd-phone

  • Tested with latest ox_lib

  • Tested with latest ox_inventory

  • Multiplayer tested

Breaking Changes

No, for current wasabi_banking. Servers on a very old wasabi_banking that still used the previous (identifier, amount, reason) export signature would need to update wasabi_banking. Other banking providers are untouched.


Checklist

  • My code follows the existing style of the project.
  • I have tested my changes.
  • I have updated any necessary documentation.
  • I have removed any debug code.
  • This PR does not include unrelated changes.
  • I have verified this works on the latest version of sd-phone.

@Github-Samuel
Github-Samuel merged commit a7f28c3 into Samuels-Development:main Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants