DeFiCh / ain

DeFi Blockchain - enabling decentralized finance on Bitcoin
https://defichain.com
MIT License
408 stars 122 forks source link

`getcollateraltoken` input parameter type and type validation does not match. #769

Closed surangap closed 3 years ago

surangap commented 3 years ago

What happened:

can not call getcollateraltoken as below testing.container.call('getcollateraltoken', [{ token: 'AAPL' }])

What you expected to happen:

successfully return results.

How to reproduce it (as minimally and precisely as possible):

What are your environment parameters:

Anything else we need to know?:

refer https://github.com/DeFiCh/ain/blob/bb88e94207534df76528e04bb93f4364f26cfb5c/src/masternodes/rpc_loan.cpp#L179 https://github.com/DeFiCh/ain/blob/bb88e94207534df76528e04bb93f4364f26cfb5c/src/masternodes/rpc_loan.cpp#L190

validations should be for an object. or make the parameter string.

defichain-bot commented 3 years ago

@surangap: Thanks for opening an issue, it is currently awaiting triage.

The triage/accepted label can be added by foundation members by writing /triage accepted in a comment.

Details I am a bot created to help the [DeFiCh](https://github.com/DeFiCh) developers manage community feedback and contributions. You can check out my [manifest file](https://github.com/DeFiCh/ain/blob/master/.github/governance.yml) to understand my behavior and what I can do. If you want to use this for your project, you can check out the [DeFiCh/oss-governance-bot](https://github.com/DeFiCh/oss-governance-bot) repository.
surangap commented 3 years ago

https://github.com/DeFiCh/ain/commit/f3add1d49a4e1e8ee4f2ec6d5f572a07b232248d now it uses single string param. will do the jellyfish refactor accordingly.