diff --git a/internal/tokens/fftokens/fftokens.go b/internal/tokens/fftokens/fftokens.go index dcf37036e7..d37ad442bc 100644 --- a/internal/tokens/fftokens/fftokens.go +++ b/internal/tokens/fftokens/fftokens.go @@ -87,6 +87,7 @@ type tokenApproval struct { type activatePool struct { PoolID string `json:"poolId"` + PoolConfig fftypes.JSONObject `json:"poolConfig"` Transaction fftypes.JSONObject `json:"transaction"` RequestID string `json:"requestId,omitempty"` } @@ -514,6 +515,7 @@ func (ft *FFTokens) ActivateTokenPool(ctx context.Context, opID *fftypes.UUID, p SetBody(&activatePool{ RequestID: opID.String(), PoolID: pool.ProtocolID, + PoolConfig: pool.Config, Transaction: blockchainInfo, }). Post("/api/v1/activatepool") diff --git a/internal/tokens/fftokens/fftokens_test.go b/internal/tokens/fftokens/fftokens_test.go index fc9dd00f3b..8245de66a1 100644 --- a/internal/tokens/fftokens/fftokens_test.go +++ b/internal/tokens/fftokens/fftokens_test.go @@ -271,12 +271,16 @@ func TestActivateTokenPool(t *testing.T) { defer done() opID := fftypes.NewUUID() - pool := &fftypes.TokenPool{ - ProtocolID: "N1", - } txInfo := map[string]interface{}{ "foo": "bar", } + poolConfig := map[string]interface{}{ + "address": "0x12345", + } + pool := &fftypes.TokenPool{ + ProtocolID: "N1", + Config: poolConfig, + } httpmock.RegisterResponder("POST", fmt.Sprintf("%s/api/v1/activatepool", httpURL), func(req *http.Request) (*http.Response, error) { @@ -286,6 +290,7 @@ func TestActivateTokenPool(t *testing.T) { assert.Equal(t, fftypes.JSONObject{ "requestId": opID.String(), "poolId": "N1", + "poolConfig": poolConfig, "transaction": txInfo, }, body) @@ -329,8 +334,12 @@ func TestActivateTokenPoolSynchronous(t *testing.T) { defer done() opID := fftypes.NewUUID() + poolConfig := map[string]interface{}{ + "foo": "bar", + } pool := &fftypes.TokenPool{ ProtocolID: "N1", + Config: poolConfig, } txInfo := map[string]interface{}{ "foo": "bar", @@ -344,6 +353,7 @@ func TestActivateTokenPoolSynchronous(t *testing.T) { assert.Equal(t, fftypes.JSONObject{ "requestId": opID.String(), "poolId": "N1", + "poolConfig": poolConfig, "transaction": txInfo, }, body) @@ -376,8 +386,12 @@ func TestActivateTokenPoolSynchronousBadResponse(t *testing.T) { defer done() opID := fftypes.NewUUID() + poolConfig := map[string]interface{}{ + "foo": "bar", + } pool := &fftypes.TokenPool{ ProtocolID: "N1", + Config: poolConfig, } txInfo := map[string]interface{}{ "foo": "bar", @@ -391,6 +405,7 @@ func TestActivateTokenPoolSynchronousBadResponse(t *testing.T) { assert.Equal(t, fftypes.JSONObject{ "requestId": opID.String(), "poolId": "N1", + "poolConfig": poolConfig, "transaction": txInfo, }, body)