firoorg / firo

The privacy-focused cryptocurrency
https://firo.org
MIT License
720 stars 354 forks source link

joinsplit with subtract fee is not working #1135

Closed qvanphong closed 2 years ago

qvanphong commented 2 years ago

Describe the issue

Hi, I want to subtract fees from sending amount with joinsplit, and follow the document, I tried to use the correct CLI command that firod telling.

But the problem is that it's not subtracting fees from sending amount. I tried even with RPC JSON call but no luck.

Can you reliably reproduce the issue?

  1. start firo node and use joinsplit command on firod `firo-cli joinsplit "{\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\":0.01}" "[\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"]"
  2. or using RPC JSON:

    "method": "joinsplit",
    "id": "tip_bot",
    "jsonrpc": "1.0",
    "params": [
        {
            "TWdJwFyr9zBs7qnxcMLfoYLzLMEmryoR9Y": 0.1
        },
        "TWdJwFyr9zBs7qnxcMLfoYLzLMEmryoR9Y"
    
    ]
    }

Expected behaviour

Fees must subtract from sending amount. ex: A sending to B 1 FIRO, the actual FIRO that B will receive will be (1 - fee)

Actual behaviour

Not subtract from sending amount.

Screenshots.

If the issue is related to the GUI, screenshots can be added to this issue via drag & drop.

What version of bitcoin-core are you using?

FIRO 0.14.9.4 - testnet

Machine specs:

justanwar commented 2 years ago

Fixed in #1153, tested