Skip to content

Commit

Permalink
Merge pull request #38 from mercuryoio/revert-37-revert-32-develop
Browse files Browse the repository at this point in the history
Revert "Revert "Develop: new ton updates""
  • Loading branch information
webresult committed Feb 19, 2020
2 parents 38a90de + 819f189 commit dd84efc
Show file tree
Hide file tree
Showing 25 changed files with 1,312 additions and 1,168 deletions.
18 changes: 15 additions & 3 deletions client.go
Expand Up @@ -71,12 +71,12 @@ func NewClient(tonCnf *TonInitRequest, config Config, timeout int64) (*Client, e
rand.Seed(time.Now().UnixNano())

client := Client{client: C.tonlib_client_json_create(), config: config, timeout: timeout,}
optionsInfo, err := client.Init(&tonCnf.Options)
optionsInfo, err := client.Init(tonCnf.Options)
//resp, err := client.executeAsynchronously(tonCnf)
if err != nil {
return &client, err
}
if optionsInfo.tonCommon.Type == "ok" {
if optionsInfo.tonCommon.Type == "options.info" {
return &client, nil
}
if optionsInfo.tonCommon.Type == "error" {
Expand Down Expand Up @@ -220,7 +220,7 @@ func (client *Client) Sync(syncState SyncState) (string, error) {
return "", err
}
}
if syncResp.Type == "ok" {
if syncResp.Type == "ton.blockIdExt" {
return "", nil
}
if syncResp.Type == "updateSyncState" {
Expand Down Expand Up @@ -334,3 +334,15 @@ func NewKey(publicKey string, secret string) *Key {

return &keyTemp
}

// because of different subclasses in common class InitialAccountState and AccountState
// InitialAccountState
type InitialAccountState interface {MessageType() string}

type AccountState RawAccountState

type MsgData interface {MessageType() string}
type DnsEntryData string

type Action interface {MessageType() string}
type DnsAction Action

0 comments on commit dd84efc

Please sign in to comment.