btc-pay-checker/internal/services/btc/test_helper.go

23 lines
590 B
Go
Raw Normal View History

2023-07-19 11:47:46 +02:00
package btc
import (
"gitea.urkob.com/urko/btc-pay-checker/kit"
"gitea.urkob.com/urko/btc-pay-checker/kit/cfg"
)
type testHelper struct {
testDeliveryAddress string
config *cfg.Config
b *BitcoinService
}
func newTestHelper() *testHelper {
config := cfg.NewConfig(kit.RootDir() + "/.test.env")
testDeliveryAddress := config.WalletAddress
return &testHelper{
config: config,
testDeliveryAddress: testDeliveryAddress,
b: NewBitcoinService(config.RpcHost, config.RpcAuth, config.RpcZmq, config.WalletAddress),
}
}