got rid of fees dependency in ledger

This commit is contained in:
Stephan D
2026-02-27 16:23:50 +01:00
parent 02a0d192b9
commit 605f0ba139
13 changed files with 51 additions and 300 deletions

View File

@@ -7,8 +7,8 @@ import (
"strings"
"time"
ledgerclient "github.com/tech/sendico/ledger/client"
trongatewayclient "github.com/tech/sendico/gateway/tron/client"
ledgerclient "github.com/tech/sendico/ledger/client"
api "github.com/tech/sendico/pkg/api/http"
"github.com/tech/sendico/pkg/auth"
"github.com/tech/sendico/pkg/db/account"
@@ -256,7 +256,7 @@ func buildGatewayAsset(cfg eapi.ChainGatewayAssetConfig) (*chainv1.Asset, error)
return &chainv1.Asset{
Chain: chain,
TokenSymbol: strings.ToUpper(tokenSymbol),
ContractAddress: strings.ToLower(strings.TrimSpace(cfg.ContractAddress)),
ContractAddress: strings.TrimSpace(cfg.ContractAddress),
}, nil
}

View File

@@ -0,0 +1,19 @@
package accountapiimp
import (
"testing"
"github.com/stretchr/testify/require"
eapi "github.com/tech/sendico/server/interface/api"
)
func TestBuildGatewayAsset_PreservesContractAddressCase(t *testing.T) {
asset, err := buildGatewayAsset(eapi.ChainGatewayAssetConfig{
Chain: "TRON_MAINNET",
TokenSymbol: "usdt",
ContractAddress: "TR7NhQjeKQxGTCi8q8ZY4pL8otSzgjLj6T",
})
require.NoError(t, err)
require.Equal(t, "USDT", asset.GetTokenSymbol())
require.Equal(t, "TR7NhQjeKQxGTCi8q8ZY4pL8otSzgjLj6T", asset.GetContractAddress())
}