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

Transfer transaction returns Malformed Request Error #45

Open
bobbyharsono opened this issue Mar 8, 2019 · 1 comment
Open

Transfer transaction returns Malformed Request Error #45

bobbyharsono opened this issue Mar 8, 2019 · 1 comment

Comments

@bobbyharsono
Copy link

bobbyharsono commented Mar 8, 2019

i am trying to run sample https://gist.github.com/innoprenuer/d4c6798fe5c0581c05a7e676e175e515

The asset creation working fine, however when i transferred asset, it returns
malformed BAD REQUEST
Transaction failed

I am unable to query (via HTTP API) the transaction ID as well, it throws 404 not found error;

Update:
It turns out, if i use BigchainDbTransactionBuilder like below,
Transaction transferTransaction = BigchainDbTransactionBuilder .init() .operation(Operations.TRANSFER) .addInput("FULLFILLMENT", spendFrom, (EdDSAPublicKey) alice.getPublic()) .addOutput("1", (EdDSAPublicKey) robert.getPublic()) .addAssets(aliceRegisterTx.getAsset().getData(), TreeMap.class) .addMetaData(transferMetadata) .buildAndSign((EdDSAPublicKey) alice.getPublic(), (EdDSAPrivateKey) alice.getPrivate()) .sendTransaction(handleServerResponse());

I notice that operation type is not detected, hence making it populated by default (CREATE), however i tried to create a manual version of transaction building (not using builder a.k.a copy paste the code in builder class) the output was set correctly (TRANSFER) but the main problem still linger.

I compared the json output after send transaction, and no invalid structure spotted

@bobbyharsono bobbyharsono changed the title Transfer transaction to testnet returns 404 error Transfer transaction returns Malformed Request Error Mar 12, 2019
@adonnini
Copy link

Hi, Did you ever resolve this problem? I am still running into it although sometimes transfer transactions do work. I cannot see a difference in the ones that work and the ones that don't work. Structurally, they are identical.
I would appreciate an update just in case...
Thanks

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

No branches or pull requests

2 participants