Skip to content

Commit 6cec304

Browse files
committed
allow skip setup
1 parent 30a6b92 commit 6cec304

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

account/account_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ func testAccountWithPath(t testing.TB, path string) (*account.Account, chan *eve
4444
signal := make(chan bool, 1)
4545

4646
cfg := &account.Config{
47+
SkipSetup: true,
4748
StorageKey: make([]byte, 32),
4849
StoragePath: path,
4950
Environment: account.TargetSandbox,

account/callbacks.go

+5
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,11 @@ func goOnConnect(user_data unsafe.Pointer) {
161161
if atomic.LoadInt32(&account.status) == 0 {
162162
go func() {
163163
for {
164+
if account.config.SkipSetup {
165+
atomic.StoreInt32(&account.status, 1)
166+
break
167+
}
168+
164169
pairingCode, unpaired, err := account.SDKPairingCode()
165170
if err != nil {
166171
time.Sleep(time.Millisecond * 100)

0 commit comments

Comments
 (0)