Skip to content

Commit 009dd50

Browse files
authored
Merge pull request #102 from Skinny001/add-shared-helper-protocol-config-reads
Add shared helper for protocol config reads
2 parents 7b51d84 + 9ec963b commit 009dd50

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

creator-keys/src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -665,11 +665,7 @@ impl CreatorKeysContract {
665665
/// When no config is stored, `is_configured` is `false` and both bps fields are `0`.
666666
/// Use this method for indexers and read-only callers that need a non-optional result.
667667
pub fn get_protocol_fee_view(env: Env) -> ProtocolFeeView {
668-
match env
669-
.storage()
670-
.persistent()
671-
.get::<DataKey, fee::FeeConfig>(&constants::storage::FEE_CONFIG)
672-
{
668+
match read_protocol_fee_config(&env) {
673669
Some(config) => ProtocolFeeView {
674670
creator_bps: config.creator_bps,
675671
protocol_bps: config.protocol_bps,

0 commit comments

Comments
 (0)