Skip to content

Add Fiat Deposit and Withdrawal Functionality with Event Emission#8

Closed
jobbykings wants to merge 1 commit intocaxtonacollins:mainfrom
jobbykings:patch-1
Closed

Add Fiat Deposit and Withdrawal Functionality with Event Emission#8
jobbykings wants to merge 1 commit intocaxtonacollins:mainfrom
jobbykings:patch-1

Conversation

@jobbykings
Copy link

  • Added custom storage mapping for fiat_balance: Map<(ContractAddress, felt252), u128>.
  • Implemented deposit_fiat and withdraw_fiat functions with balance validation.
  • Emitted FiatDeposit and FiatWithdrawal events for on-chain traceability.
  • Ensured input validation for currency and amount.
  • Maintained compatibility with existing Account, Upgradeable, and SRC9 components.

@caxtonacollins
Copy link
Owner

caxtonacollins commented May 31, 2025

@jobbykings Please avoid creating multiple PRs
this pr checks are failing.
use the first PR you created, i have point out some changes here: #7

@jobbykings jobbykings closed this May 31, 2025
@jobbykings jobbykings reopened this May 31, 2025
@jobbykings
Copy link
Author

@caxtonacollins I have made the corrections sir

@caxtonacollins
Copy link
Owner

@jobbykings check is failing, fix it

Copy link
Owner

@caxtonacollins caxtonacollins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where are your tests?

@caxtonacollins
Copy link
Owner

@jobbykings whats the update on this?

@jobbykings
Copy link
Author

@caxtonacollins
sir The tests for deposit_fiat and withdraw_fiat are included in tests/test_account.cairo.
They cover:

Successful deposits and withdrawals

Zero-amount validation

Over-withdrawal protection

@caxtonacollins
Copy link
Owner

Screenshot_20250603_155534_GitHub.jpg

Github workflow is failing

@caxtonacollins
Copy link
Owner

@jobbykings this PR shows no test file..... please check well....
please join the sync telegram so that we can stay connected: https://t.me/+lcd-x7E_9p4zYTM0

@jobbykings
Copy link
Author

@caxtonacollins sir I've now added the missing test file test_account.cairo under the tests/ directory. It was previously untracked due to its original path (contracts/account/tests/), but I’ve moved it, committed the change, and pushed it to the feature/fiat-deposit-withdraw branch.

@jobbykings
Copy link
Author

@caxtonacollins sir Hi, I realized the initial PR was missing the test file due to a path issue. I've fixed that and moved the test to the correct tests/test_account.cairo location.

I'm closing this PR and will open a new one with all changes properly tracked. Thank you!

@jobbykings jobbykings closed this Jun 5, 2025
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

Comments