(currency: Dict)
| 622 | } |
| 623 | |
| 624 | parseCurrency (currency: Dict): Currency { |
| 625 | const id = this.safeString (currency, '_coin_id'); |
| 626 | const code = this.safeCurrencyCode (id); |
| 627 | const networks: Dict = {}; |
| 628 | const chains = this.safeList (currency, 'network_list', []); |
| 629 | for (let j = 0; j < chains.length; j++) { |
| 630 | const chain = chains[j]; |
| 631 | const networkId = this.safeString (chain, 'network_id'); |
| 632 | const network = this.networkIdToCode (networkId, code); |
| 633 | networks[network] = { |
| 634 | 'info': chain, |
| 635 | 'id': networkId, |
| 636 | 'network': network, |
| 637 | 'active': undefined, |
| 638 | 'deposit': this.safeBool (chain, 'deposit_enabled', false), |
| 639 | 'withdraw': this.safeBool (chain, 'withdraw_enabled', false), |
| 640 | 'fee': this.safeNumber (chain, 'withdrawal_fee'), |
| 641 | 'precision': undefined, |
| 642 | 'limits': { |
| 643 | 'withdraw': { |
| 644 | 'min': this.safeNumber (chain, 'min_withdrawal_amount'), |
| 645 | 'max': undefined, |
| 646 | }, |
| 647 | }, |
| 648 | }; |
| 649 | } |
| 650 | return this.safeCurrencyStructure ({ |
| 651 | 'info': currency, |
| 652 | 'id': id, |
| 653 | 'code': code, |
| 654 | 'name': this.safeString (currency, 'full_name'), |
| 655 | 'active': undefined, |
| 656 | 'deposit': undefined, |
| 657 | 'withdraw': undefined, |
| 658 | 'fee': undefined, |
| 659 | 'precision': undefined, |
| 660 | 'limits': { |
| 661 | 'amount': { |
| 662 | 'min': undefined, |
| 663 | 'max': undefined, |
| 664 | }, |
| 665 | }, |
| 666 | 'type': 'crypto', // only crypto now |
| 667 | 'networks': networks, |
| 668 | }); |
| 669 | } |
| 670 | |
| 671 | /** |
| 672 | * @method |
nothing calls this directly
no test coverage detected