Skip to content

Commit 8c760bb

Browse files
authored
fix: A8 wrong network in VC (#2904)
* fix: P-926 update AssertionSupportedNetwork, filter out A8 unsupported networks * fix: change A8_SUPPORTED_NETWORKS to file only --------- Co-authored-by: higherordertech <higherordertech>
1 parent 31bcf9b commit 8c760bb

File tree

2 files changed

+15
-2
lines changed
  • primitives/core/src/assertion
  • tee-worker/client-api/parachain-api/prepare-build/interfaces/vc

2 files changed

+15
-2
lines changed

primitives/core/src/assertion/mod.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,15 @@ pub enum Assertion {
143143
Dynamic(DynamicParams)
144144
}
145145

146+
const A8_SUPPORTED_NETWORKS: [Web3Network; 6] = [
147+
Web3Network::Polkadot,
148+
Web3Network::Kusama,
149+
Web3Network::Litentry,
150+
Web3Network::Litmus,
151+
Web3Network::Khala,
152+
Web3Network::Ethereum,
153+
];
154+
146155
impl Assertion {
147156
// Given an assertion enum type, retrieve the supported web3 networks.
148157
// So we limit the network types on the assertion definition level.
@@ -164,7 +173,11 @@ impl Assertion {
164173
Self::VIP3MembershipCard(..) |
165174
Self::WeirdoGhostGangHolder => vec![Web3Network::Ethereum],
166175
// total tx over `networks`
167-
Self::A8(network) => network.to_vec(),
176+
Self::A8(networks) => networks
177+
.into_iter()
178+
.filter(|network| A8_SUPPORTED_NETWORKS.contains(*network))
179+
.cloned()
180+
.collect::<Vec<_>>(),
168181
// Achainable Assertions
169182
Self::Achainable(arg) => arg.chains(),
170183
// OneBlock Assertion

tee-worker/client-api/parachain-api/prepare-build/interfaces/vc/definitions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default {
3838
},
3939
},
4040
AssertionSupportedNetwork: {
41-
_enum: ["Litentry", "Litmus", "LitentryRococo", "Polkadot", "Kusama", "Khala", "Ethereum", "TestNet"],
41+
_enum: ["Polkadot", "Kusama", "Litentry", "Litmus", "__UnsupportedLitentryRococo", "Khala", "__UnsupportedSubstrateTestnet", "Ethereum"],
4242
},
4343
DynamicParams: {
4444
smart_contract_id: "[u8;20]",

0 commit comments

Comments
 (0)