Add Balance and Withdrawal

This commit is contained in:
aditya.siregar
2024-07-31 23:02:15 +07:00
parent 38003f84d1
commit 4c1a819365
19 changed files with 434 additions and 69 deletions
+3 -1
View File
@@ -55,7 +55,7 @@ func NewServiceManagerImpl(cfg *config.Config, repo *repository.RepoManagerImpl)
SiteSvc: site.NewSiteService(repo.Site),
LicenseSvc: service.NewLicenseService(repo.License),
Transaction: transaction.New(repo.Transaction),
Balance: balance.NewBalanceService(repo.Wallet),
Balance: balance.NewBalanceService(repo.Wallet, repo.Trx, repo.Crypto, &cfg.Withdraw, repo.Transaction),
}
}
@@ -150,4 +150,6 @@ type Transaction interface {
type Balance interface {
GetByID(ctx context.Context, id int64) (*entity.Balance, error)
WithdrawInquiry(ctx context.Context, req *entity.BalanceWithdrawInquiry) (*entity.BalanceWithdrawInquiryResponse, error)
WithdrawExecute(ctx mycontext.Context, req *entity.WalletWithdrawRequest) (*entity.WalletWithdrawResponse, error)
}