dashed-slug.net › Forums › TurtleCoin Adapter extension support › I’m getting ready to replace my hacked up monero adapter with yours › Reply To: I’m getting ready to replace my hacked up monero adapter with yours
The number of decimals is set in the filter that defines the coins.
The filter is initialized with values in assets/coins.csv
ARMS,2ACoin,100,0.00001,arms:%s,%01.4f,https://explorer.2acoin.org/?hash=%s#blockchain_transaction,,4
%01.4f is the pattern for displaying amounts, and the last value of 4 is the number of decimals. These values should match.
To modify the values, use the wallets_turtle_coins
filter described in the adapter’s homepage, to modify the values. Something like:
function wallets_turtlecoin_adapter_filter( $coins ) {
$coins['ARMS']['amount pattern'] = '%01.8f';
$coins['ARMS']['decimals'] = 8;
return $coins;
}
add_filter( 'wallets_turtle_coins', 'wallets_turtlecoin_adapter_filter' );
However, I don’t think it’s necessary, as 2ACoin has 4 decimals I believe.
with regards
EDIT: Changed $coins['2ACOIN']
to the correct indexing, $coins['ARMS']
.