From 05b89c52266d1e067ffc429d29405d49f50762dc Mon Sep 17 00:00:00 2001 From: Clara Tersi Date: Fri, 18 Oct 2024 13:21:51 -0300 Subject: [PATCH] fix: remove asset_code validation on account :bug: --- components/ledger/internal/app/command/create-account.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/components/ledger/internal/app/command/create-account.go b/components/ledger/internal/app/command/create-account.go index 94c19f1f..e7cefd25 100644 --- a/components/ledger/internal/app/command/create-account.go +++ b/components/ledger/internal/app/command/create-account.go @@ -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())