Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SI-2213-amd-addr-reset-event #237

Merged
merged 6 commits into from
Dec 20, 2023
Merged

Conversation

Allyson-English
Copy link
Member

@Allyson-English Allyson-English commented Dec 13, 2023

When an AftermarketDeviceAddressReset event is received, update the 0x address of the device to reflect the change

Notes:

  • ethereum_address is a primary key in the aftermarket_devices table so this deletes the record and re-inserts it
  • regenerated registry.go

Copy link

linear bot commented Dec 13, 2023

Comment on lines 710 to 711
SET ethereum_address = decode('%s', 'hex')
WHERE token_id = %d;`,
Copy link
Member

@elffjs elffjs Dec 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use ? or $1 or something for these? Is that allowed? I think it's less alarming that way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always have to check that decode is being used correctly. I think it is.

@@ -689,6 +693,30 @@ func (c *ContractsEventsConsumer) dcnNewExpiration(e *ContractEventData) error {
return nil
}

// $1 is the updated aftermarket device address, $2 is the token id
const aftermarketDeviceAddressResetQuery = `
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm kinda happier to have this inline. Is that picky?

@Allyson-English Allyson-English merged commit 7039c8c into main Dec 20, 2023
2 checks passed
@Allyson-English Allyson-English deleted the SI-2213-amd-addr-reset-event branch February 4, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants