diff --git a/deployments/mainnet/declarations.json b/deployments/mainnet/declarations.json index b420035..e245822 100644 --- a/deployments/mainnet/declarations.json +++ b/deployments/mainnet/declarations.json @@ -1,5 +1,5 @@ { - "pragma_Oracle": "0x230f20832d73433a0ef69663545aabb607a3bbc0ff0a5f75e5d9716730e4141", + "pragma_Oracle": "0x52fcd24ffeb5ea84cfc781dd3bf4126d718acedb58547d73d6480779acbe60a", "pragma_Ownable": "0x7b50a7a9bbb75d08248135003f1c87f0d44ba23018dc0ca480ac37a901531f3", "pragma_PublisherRegistry": "0x306288971002bd7906e3a607d504dfb28dcbdc7655a115984e567dce3b67e8f", "pragma_SummaryStats": "0x3b5bf1c2f918de14620b3c63e2c6543cf0a138df258bce3d03e3fb0b7d2183a", diff --git a/pragma-oracle/src/oracle/oracle.cairo b/pragma-oracle/src/oracle/oracle.cairo index d20dc3e..de93fd2 100644 --- a/pragma-oracle/src/oracle/oracle.cairo +++ b/pragma-oracle/src/oracle/oracle.cairo @@ -544,10 +544,10 @@ mod Oracle { DataType::GenericEntry(_) => panic_with_felt252('Set only for Spot entries'), }; - // Get base currency and pool - let base_asset: felt252 = self.get_pair(asset).base_currency_id; - assert(base_asset != 0, 'Asset not registered'); - let pool_address: ContractAddress = self.tokenized_vault.read((base_asset, 'STRK')); + // Get quote currency and pool + let quote_asset: felt252 = self.get_pair(asset).quote_currency_id; + assert(quote_asset != 0, 'Asset not registered'); + let pool_address: ContractAddress = self.tokenized_vault.read((quote_asset, 'STRK')); assert( pool_address != starknet::contract_address_const::<0>(), 'No pool address for given token'