mirror of
				https://github.com/Instadapp/trustwallet-assets.git
				synced 2024-07-29 22:37:31 +00:00 
			
		
		
		
	 9b41a52182
			
		
	
	
		9b41a52182
		
			
		
	
	
	
	
		
			
			* Add token list support for pairs on binance chain * Update tokenlists.ts * Update tokenlists.ts * Update tokenlists.ts * Fix asset for bnb pair * Update package-lock.json * Add models for token list * Add BinanceMarket
		
			
				
	
	
		
			9 lines
		
	
	
		
			382 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
		
			382 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import BigNumber from "bignumber.js";
 | |
| 
 | |
| export function toSatoshis(value: string, decimals: number): string {
 | |
|     return new BigNumber(value).multipliedBy(new BigNumber(10).exponentiatedBy(decimals)).toFixed()
 | |
| }
 | |
| 
 | |
| export function fromSatoshis(value: string, decimals: number): string {
 | |
|     return new BigNumber(value).dividedBy(new BigNumber(10).exponentiatedBy(decimals)).toFixed()
 | |
| } |