From c1ba0fa19e125ef9999e6537a641e663f9f15079 Mon Sep 17 00:00:00 2001 From: Mauro Piazza Date: Wed, 6 Nov 2024 20:24:48 +0100 Subject: [PATCH] fix(adapter.cpp): rm check because restricts usability --- cpp/contracts/adapter.cpp | 2 -- cpp/test/adapter-non-local.test.js | 8 -------- 2 files changed, 10 deletions(-) diff --git a/cpp/contracts/adapter.cpp b/cpp/contracts/adapter.cpp index 2d0b0a2c..1e9ccef7 100644 --- a/cpp/contracts/adapter.cpp +++ b/cpp/contracts/adapter.cpp @@ -160,8 +160,6 @@ void adapter::settee(public_key pub_key, bytes attestation) { require_auth(get_self()); pam::tee_pubkey _tee_pubkey(get_self(), get_self().value); - check(_tee_pubkey.exists(), "adapter contract not initialized"); - _tee_pubkey.set(pam::tee{ .key = pub_key, .attestation = attestation diff --git a/cpp/test/adapter-non-local.test.js b/cpp/test/adapter-non-local.test.js index aee41ff3..30c2f578 100644 --- a/cpp/test/adapter-non-local.test.js +++ b/cpp/test/adapter-non-local.test.js @@ -413,14 +413,6 @@ describe('Adapter EVM -> EOS testing', () => { await expectToThrow(action, errors.AUTH_MISSING(adapter.account)) }) - it('Should throw if adapter is not initialized', async () => { - const action = notInitAdapter.contract.actions - .settee([teePubKey, attestation]) - .send(active(notInitAdapter.account)) - - await expectToThrow(action, errors.NOT_INITIALIZED) - }) - it('Should set the tee pubKey and attestation correctly', async () => { await adapter.contract.actions .settee([teePubKey, attestation])