Skip to content

Commit

Permalink
Merge pull request #343 from bob-collective/fix/strategy-data
Browse files Browse the repository at this point in the history
fix: add strategy data
  • Loading branch information
gregdhill authored Sep 11, 2024
2 parents d6e91a4 + 5817d79 commit 445c035
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions sdk/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gobob/bob-sdk",
"version": "2.2.7",
"version": "2.2.8",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
Expand Down
5 changes: 3 additions & 2 deletions sdk/src/gateway/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,15 @@ export class GatewayApiClient {
throw new Error("Invalid user address");
}

const abiCoder = new AbiCoder();
const request: GatewayCreateOrderRequest = {
gatewayAddress: gatewayQuote.gatewayAddress,
strategyAddress: gatewayQuote.strategyAddress,
satsToConvertToEth: params.gasRefill || 0,
userAddress: params.toUserAddress,
// TODO: figure out how to get extra data
gatewayExtraData: undefined,
strategyExtraData: undefined,
// TODO: update strategy data
strategyExtraData: abiCoder.encode(["uint256"], [0]),
satoshis: gatewayQuote.satoshis,
};

Expand Down
2 changes: 1 addition & 1 deletion sdk/test/gateway.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ describe("Gateway Tests", () => {
.post(`/order`)
.reply(201, {
uuid: "00000000-0000-0000-0000-000000000000",
opReturnHash: "0x10e69ac36b8d7ae8eb1dca7fe368da3d27d159259f48d345ff687ef0fcbdedcd",
opReturnHash: "0x8d0fd89210149d4219c87fa814a4bcde0c6a36b8fe2dff52b1d3eaa9e7cf0a9a",
});

await expect(async () => {
Expand Down

0 comments on commit 445c035

Please sign in to comment.