| 84 | } |
| 85 | |
| 86 | static Object DexOperatorToJson(const CAccountDBCache &accountCache, const DexOperatorDetail &dexOperator) { |
| 87 | Object result; |
| 88 | CKeyID ownerKeyid; |
| 89 | accountCache.GetKeyId(dexOperator.owner_regid, ownerKeyid); |
| 90 | CKeyID feeReceiverKeyId; |
| 91 | accountCache.GetKeyId(dexOperator.fee_receiver_regid, feeReceiverKeyId); |
| 92 | result.push_back(Pair("owner_regid", dexOperator.owner_regid.ToString())); |
| 93 | result.push_back(Pair("owner_addr", ownerKeyid.ToAddress())); |
| 94 | result.push_back(Pair("fee_receiver_regid", dexOperator.fee_receiver_regid.ToString())); |
| 95 | result.push_back(Pair("fee_receiver_addr", feeReceiverKeyId.ToAddress())); |
| 96 | result.push_back(Pair("name", dexOperator.name)); |
| 97 | result.push_back(Pair("portal_url", dexOperator.portal_url)); |
| 98 | result.push_back(Pair("order_open_mode", kOpenModeHelper.GetName(dexOperator.order_open_mode))); |
| 99 | result.push_back(Pair("maker_fee_ratio", dexOperator.maker_fee_ratio)); |
| 100 | result.push_back(Pair("taker_fee_ratio", dexOperator.taker_fee_ratio)); |
| 101 | result.push_back(Pair("order_open_dexop_list", json::ToJson(dexOperator.order_open_dexop_set))); |
| 102 | result.push_back(Pair("memo", dexOperator.memo)); |
| 103 | result.push_back(Pair("memo_hex", HexStr(dexOperator.memo))); |
| 104 | result.push_back(Pair("activated", dexOperator.activated)); |
| 105 | return result; |
| 106 | } |
| 107 | |
| 108 | namespace RPC_PARAM { |
| 109 | |