Module: Glueby::Internal::Wallet::TapyrusCoreWalletAdapter::Util

Included in:
Glueby::Internal::Wallet::TapyrusCoreWalletAdapter
Defined in:
lib/glueby/internal/wallet/tapyrus_core_wallet_adapter.rb

Class Method Summary collapse

Class Method Details

.tpc_to_tapyrus(tpc) ⇒ Integer

Convert TPC to tapyrus. 1 TPC is 10**8 tapyrus. Example) “0.00000010” to 10.

Parameters:

  • tpc (String)

Returns:

  • (Integer)

    tapyrus



18
19
20
# File 'lib/glueby/internal/wallet/tapyrus_core_wallet_adapter.rb', line 18

def tpc_to_tapyrus(tpc)
  (BigDecimal(tpc) * 10**8).to_i
end