Skip to content

Commit

Permalink
Revert "stripe#401 Display API Version when running listen (stripe#404)…
Browse files Browse the repository at this point in the history
…" (stripe#406)

This reverts commit b0c4eec.
  • Loading branch information
tomer-stripe authored Mar 19, 2020
1 parent b0c4eec commit e272ac6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pkg/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (p *Proxy) Run() error {

select {
case <-p.webSocketClient.Connected():
ansi.StopSpinner(s, fmt.Sprintf("Ready! You are using Stripe API Version %s. Your webhook signing secret is %s (^C to quit)", session.APIVersion, ansi.Bold(session.Secret)), p.cfg.Log.Out)
ansi.StopSpinner(s, fmt.Sprintf("Ready! Your webhook signing secret is %s (^C to quit)", ansi.Bold(session.Secret)), p.cfg.Log.Out)
case <-p.ctx.Done():
ansi.StopSpinner(s, "", p.cfg.Log.Out)
p.cfg.Log.Fatalf("Aborting")
Expand Down
2 changes: 0 additions & 2 deletions pkg/stripeauth/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ func (c *Client) Authorize(ctx context.Context, deviceName string, websocketFeat
return nil, err
}

session.APIVersion = resp.Header["Stripe-Version"]
c.cfg.Log.WithFields(log.Fields{
"api_version": session.APIVersion,
"prefix": "stripeauth.Client.Authorize",
"websocket_url": session.WebSocketURL,
"websocket_id": session.WebSocketID,
Expand Down
1 change: 0 additions & 1 deletion pkg/stripeauth/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package stripeauth
// StripeCLISession is the API resource returned by Stripe when initiating
// a new CLI session.
type StripeCLISession struct {
APIVersion []string
DisplayConnectFilterWarning bool `json:"display_connect_filter_warning"`
ReconnectDelay int `json:"reconnect_delay"`
Secret string `json:"secret"`
Expand Down
6 changes: 2 additions & 4 deletions pkg/websocket/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ func (c *Client) connect() bool {

c.changeConnection(conn)
c.isConnected = true

c.wg = &sync.WaitGroup{}
c.wg.Add(2)

Expand All @@ -216,10 +217,7 @@ func (c *Client) connect() bool {
go c.writePump()

c.cfg.Log.WithFields(log.Fields{
"prefix": "websocket.client.connect",
"headers": resp.Header,
"status": resp.Status,
"config": c.cfg,
"prefix": "websocket.client.connect",
}).Debug("Connected!")

return true
Expand Down

0 comments on commit e272ac6

Please sign in to comment.