ar-io / arns-service

Koa microservice that leverages Warp to support the ArNS Portal and ar.io observers.
https://api.arns.app
GNU Affero General Public License v3.0
19 stars 4 forks source link

fix(PE-5252): only certain params should be casted to numbers #88

Closed dtfiedler closed 6 months ago

dtfiedler commented 6 months ago

Example request

http://api.arns.app/v1/contract/bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U/read/priceForInteraction?interactionName=extendRecord&name=666666&years=1

Current response:

Status: 400 Message:

Invalid input for interaction for extendRecord: name ('666666') must be string

Update with changes:

{
"contractTxId": "bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U",
"result": {
"input": {
"function": "priceForInteraction",
"interactionName": "extendRecord",
"name": "666666",
"years": 1
},
"price": 1000
},
"evaluationOptions": {
"maxInteractionEvaluationTimeSeconds": 3600
}
}