use crate::sns::report::{
MAINNET_SNS_WASM_CANISTER_ID, MainnetSns, MainnetSnsToken, SNS_TOKEN_REPORT_SCHEMA_VERSION,
SnsSourceRequest, SnsTokenReport,
};
pub(in crate::sns::report) fn sns_token_report_from_parts(
fetch_request: SnsSourceRequest,
sns: MainnetSns,
token: MainnetSnsToken,
) -> SnsTokenReport {
SnsTokenReport {
schema_version: SNS_TOKEN_REPORT_SCHEMA_VERSION,
network: fetch_request.network,
sns_wasm_canister_id: MAINNET_SNS_WASM_CANISTER_ID.to_string(),
fetched_at: fetch_request.fetched_at,
source_endpoint: fetch_request.endpoint,
fetched_by: fetch_request.fetched_by,
id: sns.id,
name: sns.name,
root_canister_id: sns.root_canister_id,
ledger_canister_id: sns.ledger_canister_id,
sns_index_canister_id: sns.index_canister_id,
token_name: token.token_name,
token_symbol: token.token_symbol,
decimals: token.decimals,
transfer_fee: token.transfer_fee,
total_supply: token.total_supply,
minting_account_owner: token.minting_account_owner,
minting_account_subaccount_hex: token.minting_account_subaccount_hex,
ledger_index_canister_id: token.ledger_index_canister_id,
ledger_index_error: token.ledger_index_error,
supported_standards: token.supported_standards,
metadata: token.metadata,
}
}