mirror of
https://github.com/grassrootseconomics/cic-go.git
synced 2026-05-28 09:47:56 +02:00
fix: pointer param for provider
This commit is contained in:
@@ -10,9 +10,9 @@ type BatchBalance struct {
|
||||
batchContract common.Address
|
||||
}
|
||||
|
||||
func NewBatchBalance(rpcProvider provider.Provider, batchContract common.Address) (*BatchBalance, error) {
|
||||
func NewBatchBalance(rpcProvider *provider.Provider, batchContract common.Address) (*BatchBalance, error) {
|
||||
return &BatchBalance{
|
||||
provider: &rpcProvider,
|
||||
provider: rpcProvider,
|
||||
batchContract: batchContract,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ func TestBatchBalance_Connect(t *testing.T) {
|
||||
t.Errorf("Creating an rpc instance failed = %v", err)
|
||||
}
|
||||
|
||||
batchBalance, _ := NewBatchBalance(*newProvider, w3.A(conf.batchContract))
|
||||
batchBalance, _ := NewBatchBalance(newProvider, w3.A(conf.batchContract))
|
||||
|
||||
t.Run(name, func(t *testing.T) {
|
||||
if err := batchBalance.provider.EthClient.Close(); (err != nil) != wantErr {
|
||||
|
||||
@@ -40,7 +40,7 @@ func TestBatchBalance_TokensBalance(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Errorf("Creating an rpc instance failed = %v", err)
|
||||
}
|
||||
batchBalance, err := NewBatchBalance(*newProvider, w3.A(conf.batchContract))
|
||||
batchBalance, err := NewBatchBalance(newProvider, w3.A(conf.batchContract))
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("NewBatchBalance error = %v", err)
|
||||
|
||||
Reference in New Issue
Block a user