(fee, currency: Currency = undefined)
| 2627 | } |
| 2628 | |
| 2629 | parseDepositWithdrawFee (fee, currency: Currency = undefined) { |
| 2630 | // |
| 2631 | // { |
| 2632 | // "full_name": "Alchemix", |
| 2633 | // "default_network": "ETH", |
| 2634 | // "network_list": [ |
| 2635 | // { |
| 2636 | // "network_id": "ETH", |
| 2637 | // "withdrawal_fee": "0.25000000", |
| 2638 | // "withdraw_enabled": true, |
| 2639 | // "min_withdrawal_amount": "0.5", |
| 2640 | // "deposit_enabled": true, |
| 2641 | // "confirmation_required": "0" |
| 2642 | // } |
| 2643 | // ] |
| 2644 | // } |
| 2645 | // |
| 2646 | const networkList = this.safeList (fee, 'network_list', []); |
| 2647 | const networkListLength = networkList.length; |
| 2648 | const result: Dict = { |
| 2649 | 'info': fee, |
| 2650 | 'withdraw': { |
| 2651 | 'fee': undefined, |
| 2652 | 'percentage': undefined, |
| 2653 | }, |
| 2654 | 'deposit': { |
| 2655 | 'fee': undefined, |
| 2656 | 'percentage': undefined, |
| 2657 | }, |
| 2658 | 'networks': {}, |
| 2659 | }; |
| 2660 | if (networkList !== undefined) { |
| 2661 | for (let i = 0; i < networkListLength; i++) { |
| 2662 | const networkInfo = networkList[i]; |
| 2663 | const networkId = this.safeString (networkInfo, 'network_id'); |
| 2664 | const currencyCode = this.safeString (currency, 'code'); |
| 2665 | const networkCode = this.networkIdToCode (networkId, currencyCode); |
| 2666 | result['networks'][networkCode] = { |
| 2667 | 'deposit': { 'fee': undefined, 'percentage': undefined }, |
| 2668 | 'withdraw': { 'fee': this.safeNumber (networkInfo, 'withdrawal_fee'), 'percentage': false }, |
| 2669 | }; |
| 2670 | if (networkListLength === 1) { |
| 2671 | result['withdraw']['fee'] = this.safeNumber (networkInfo, 'withdrawal_fee'); |
| 2672 | result['withdraw']['percentage'] = false; |
| 2673 | } |
| 2674 | } |
| 2675 | } |
| 2676 | return result; |
| 2677 | } |
| 2678 | |
| 2679 | /** |
| 2680 | * @method |
nothing calls this directly
no test coverage detected