refactored payment orchestration
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/tech/sendico/pkg/ledgerconv"
|
||||
"github.com/tech/sendico/pkg/merrors"
|
||||
"github.com/tech/sendico/pkg/model"
|
||||
"github.com/tech/sendico/pkg/model/account_role"
|
||||
"github.com/tech/sendico/pkg/mservice"
|
||||
describablev1 "github.com/tech/sendico/pkg/proto/common/describable/v1"
|
||||
ledgerv1 "github.com/tech/sendico/pkg/proto/ledger/v1"
|
||||
@@ -132,7 +133,7 @@ func mapLedgerAccountType(accountType srequest.LedgerAccountType) (ledgerv1.Acco
|
||||
return parsed, nil
|
||||
}
|
||||
|
||||
func mapLedgerAccountRole(role model.AccountRole) (ledgerv1.AccountRole, error) {
|
||||
func mapLedgerAccountRole(role account_role.AccountRole) (ledgerv1.AccountRole, error) {
|
||||
raw := strings.TrimSpace(string(role))
|
||||
if ledgerconv.IsAccountRoleUnspecified(raw) {
|
||||
return ledgerv1.AccountRole_ACCOUNT_ROLE_OPERATING, nil
|
||||
|
||||
Reference in New Issue
Block a user