diff --git a/subgraph/schema.graphql b/subgraph/schema.graphql index 0b3f318e3..d6bde9e83 100644 --- a/subgraph/schema.graphql +++ b/subgraph/schema.graphql @@ -47,5 +47,4 @@ type Event @entity { timestamp: BigInt! activity: ActivityData type: EventType! - amount: BigInt! } diff --git a/subgraph/src/bitcoin-depositor.ts b/subgraph/src/bitcoin-depositor.ts index c88e29058..4d07ac838 100644 --- a/subgraph/src/bitcoin-depositor.ts +++ b/subgraph/src/bitcoin-depositor.ts @@ -22,7 +22,6 @@ export function handleDepositInitialized(event: DepositInitializedEvent): void { eventEntity.activity = depositEntity.id eventEntity.timestamp = event.block.timestamp - eventEntity.amount = event.params.initialAmount eventEntity.type = "Initialized" depositOwnerEntity.save() @@ -41,9 +40,9 @@ export function handleDepositFinalized(event: DepositFinalizedEvent): void { depositEntity.amountToDeposit = event.params.bridgedAmount const eventEntity = getOrCreateEvent(event.transaction.hash.toHexString()) + eventEntity.activity = depositEntity.id eventEntity.timestamp = event.block.timestamp - eventEntity.amount = event.params.initialAmount eventEntity.type = "Finalized" depositEntity.save() diff --git a/subgraph/subgraph.yaml b/subgraph/subgraph.yaml index 871010ca6..18414c988 100644 --- a/subgraph/subgraph.yaml +++ b/subgraph/subgraph.yaml @@ -19,7 +19,7 @@ dataSources: - DepositOwner - Deposit - Withdraw - - LogData + - Event abis: - name: BitcoinDepositor file: ./abis/BitcoinDepositor.json diff --git a/subgraph/tests/bitcoin-depositor.test.ts b/subgraph/tests/bitcoin-depositor.test.ts index 30d5b8aa4..56b81a2e4 100644 --- a/subgraph/tests/bitcoin-depositor.test.ts +++ b/subgraph/tests/bitcoin-depositor.test.ts @@ -96,7 +96,6 @@ describe("handleDepositInitialized", () => { depositInitializedEvent.block.timestamp.toString(), ) - assert.fieldEquals("Event", txId, "amount", initialAmount.toString()) assert.fieldEquals("Event", txId, "type", "Initialized") }) }) @@ -152,7 +151,6 @@ describe("handleDepositFinalized", () => { depositFinalizedEvent.block.timestamp.toString(), ) - assert.fieldEquals("Event", txId, "amount", initialAmount.toString()) assert.fieldEquals("Event", txId, "type", "Finalized") }) })