-
Notifications
You must be signed in to change notification settings - Fork 1
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
More Configurability and Working Signatures For Required Routes #29
Conversation
otobongfp
commented
Sep 6, 2024
•
edited
Loading
edited
- Added the delete feature to the inbox - controller & service.
- Added Network ID to the config so that a user can set it, but by default the ID is set mainnet - "L".
- Fixed how the http-signatures lib gets the actual url signed by the client..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test
import { verify } from '@ltonetwork/http-message-signatures'; | ||
|
||
export const lto = new LTO(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't create a global LTO object. You don't know the network.
private lto: LTO; | ||
|
||
constructor() { | ||
this.lto = new LTO(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the lto
property
const network = getNetwork(walletAddress); | ||
|
||
//switch to testnet if address is testnet | ||
if (network == 'T') this.lto = new LTO(network); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This never switches back to mainnet. No need to switch though. Just create a new LTO object for each request.
const lto = new LTO(network)