Skip to content

Commit

Permalink
fix: remove asset_code validation on account 🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaraTersi committed Oct 18, 2024
1 parent 381ba21 commit 05b89c5
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions components/ledger/internal/app/command/create-account.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ func (uc *UseCase) CreateAccount(ctx context.Context, organizationID, ledgerID,
Scale: &balanceValue,
}

if err := common.ValidateCurrency(cai.AssetCode); err != nil {
return nil, common.ValidateBusinessError(cn.ErrInvalidCodeFormat, reflect.TypeOf(a.Account{}).Name())
}

isAsset, _ := uc.AssetRepo.FindByNameOrCode(ctx, organizationID, ledgerID, "", cai.AssetCode)
if !isAsset {
return nil, common.ValidateBusinessError(cn.ErrAssetCodeNotFound, reflect.TypeOf(a.Account{}).Name())
Expand Down

0 comments on commit 05b89c5

Please sign in to comment.