Skip to content

Commit

Permalink
further debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam-Jeston committed Mar 22, 2024
1 parent 2a8d27c commit ae08b83
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/orderbook/src/seaport/seaport-lib-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@ function convertToV6Provider(
): JsonRpcProvider {
const overwrittenProvider = new JsonRpcProvider(provider.connection.url);

// eslint-disable-next-line no-console
console.log('Overwritten provider getSigner method');
// eslint-disable-next-line no-console
console.log(overwrittenProvider.getSigner);
// eslint-disable-next-line no-console
console.log('Overwriter provider methods');
// eslint-disable-next-line no-console
console.log(JSON.stringify(Object.keys(overwrittenProvider), null, 2));

// Need to override the getSigner method to mimic V5 behaviour
overwrittenProvider.getSigner = async function getSigner(
address?: number | string,
Expand All @@ -47,6 +38,15 @@ function convertToV6Provider(
return new JsonRpcSigner(this, address);
};

// eslint-disable-next-line no-console
console.log('Overwritten provider getSigner method');
// eslint-disable-next-line no-console
console.log(overwrittenProvider.getSigner);
// eslint-disable-next-line no-console
console.log('Overwriter provider methods');
// eslint-disable-next-line no-console
console.log(JSON.stringify(Object.keys(overwrittenProvider), null, 2));

return overwrittenProvider;
}

Expand Down
1 change: 1 addition & 0 deletions packages/orderbook/src/seaport/seaport.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ describe('Seaport', () => {
mockedSeaportJs.fulfillOrders(
deepEqual({
accountAddress: fulfiller,
recipientAddress: fulfiller,
fulfillOrderDetails: [
{
order: {
Expand Down
3 changes: 3 additions & 0 deletions packages/orderbook/src/seaport/seaport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,15 @@ export class Seaport {
const address = await signer.getAddress();
// eslint-disable-next-line no-console
console.log(`Fulfiller address: ${address}`);
// eslint-disable-next-line no-console
console.log(`Provided address: ${account}`);
} catch {
// no-op - this is for temporary debugging
}

const { actions: seaportActions } = await seaportLib.fulfillOrders({
accountAddress: account,
recipientAddress: account,
fulfillOrderDetails: [
{
order: {
Expand Down

0 comments on commit ae08b83

Please sign in to comment.