monero-integrations / monerophp

Monero PHP library + JsonRPC Client
MIT License
120 stars 76 forks source link

temporary check_spend_proof fix #74

Closed itssteven closed 6 years ago

itssteven commented 6 years ago
$txid = 'd77b32a3dfb3a1f549100e4831f225f4b4be7ccb854982c14dd7048f624cb2f1';
$txid2 = '9c1e5ba94e50cd51d809ed013b6cc593a484b8991fcbaacf2edf4af69f6d3212';

$wat = $walletRPC->get_spend_proof( $txid );
echo 'get_spend_proof: ', PHP_EOL;
print_r( $wat );

$wat2 = $walletRPC->check_spend_proof( $txid2, $wat['signature'] );
echo 'check_spend_proof: ', PHP_EOL;
print_r( $wat2 );

This will return good=>false now, rather than throwing an exception because of 'incorrect signature size'

serhack commented 6 years ago

Hello, thanks for submitting a pull request.

I can not accept this fixing because the library CAN'T return a non-rpc array. It should return the answer from RPC response.

itssteven commented 6 years ago

I agree. I'll try to get it fixed at the root.