got rid of fees dependency in ledger
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
19
api/server/internal/server/accountapiimp/service_test.go
Normal file
19
api/server/internal/server/accountapiimp/service_test.go
Normal 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())
|
||||
}
|
||||
Reference in New Issue
Block a user