Skip to content

Commit 7002ee1

Browse files
Merge branch 'main' into bot-rust-update
2 parents 0d9ecc9 + 4cbc270 commit 7002ee1

File tree

21 files changed

+25
-239
lines changed

21 files changed

+25
-239
lines changed

scripts/observatory.certificate.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const getGoogleCertificate = async ({ mainnet, provider: cmdProvider }) => {
1212
? observatoryActorIC()
1313
: observatoryActorLocal());
1414

15-
const provider = cmdProvider === 'github' ? { GitHub: null } : { Google: null };
15+
const provider = cmdProvider === 'github_auth' ? { GitHubAuth: null } : { Google: null };
1616

1717
const certificate = await get_openid_certificate({ provider });
1818

@@ -31,7 +31,7 @@ const mainnet = targetMainnet();
3131
const args = process.argv.slice(2);
3232
const provider = nextArg({ args, option: '-p' }) ?? nextArg({ args, option: '--provider' });
3333

34-
if (!['google', 'github'].includes(provider)) {
34+
if (!['google', 'github_auth'].includes(provider)) {
3535
console.log(`Provider ${provider} is not supported`);
3636
process.exit(1);
3737
}

scripts/observatory.monitoring.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const toggleOpenIdMonitoring = async ({ mainnet, provider, start }) => {
99
? observatoryActorIC()
1010
: observatoryActorLocal());
1111

12-
const args = provider === 'github' ? { GitHub: null } : { Google: null };
12+
const args = provider === 'github_auth' ? { GitHubAuth: null } : { Google: null };
1313

1414
if (start) {
1515
await start_openid_monitoring(args);
@@ -39,7 +39,7 @@ if (start === true && stop === true) {
3939

4040
const provider = nextArg({ args, option: '-p' }) ?? nextArg({ args, option: '--provider' });
4141

42-
if (!['google', 'github'].includes(provider)) {
42+
if (!['google', 'github_auth'].includes(provider)) {
4343
console.log(`Provider ${provider} is not supported`);
4444
process.exit(1);
4545
}

src/console/src/factory/orchestrator.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ where
8585
Err("Unknown caller".to_string())
8686
}
8787

88+
#[allow(clippy::too_many_arguments)]
8889
pub async fn create_segment_with_account<F, Fut, P, Pay, R, Refund>(
8990
create: F,
9091
process_payment: P,
@@ -151,7 +152,7 @@ where
151152
R: FnOnce(Principal, Fee) -> Refund,
152153
Refund: Future<Output = Result<BlockIndex, String>>,
153154
{
154-
let refund_block_index = refund_payment(purchaser.clone(), fee).await?;
155+
let refund_block_index = refund_payment(*purchaser, fee).await?;
155156

156157
// We record the refund in the payment list
157158
update_icrc_payment_refunded(payment_key, &refund_block_index)

src/console/src/fees/types.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
pub enum FeeKind {
22
Cycles,
3+
#[allow(clippy::upper_case_acronyms)]
34
ICP,
45
}

src/console/src/impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl Segment {
132132

133133
Self {
134134
segment_id: *segment_id,
135-
metadata: metadata.unwrap_or(HashMap::new()),
135+
metadata: metadata.unwrap_or_default(),
136136
created_at: now,
137137
updated_at: now,
138138
}

src/console/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ mod rates;
1717
mod segments;
1818
mod store;
1919
mod types;
20-
mod upgrade;
2120

2221
use crate::types::interface::AuthenticationArgs;
2322
use crate::types::interface::AuthenticationResult;

src/console/src/memory/lifecycle.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use crate::fees::init_factory_fees;
44
use crate::memory::manager::{get_memory_upgrades, init_stable_state, STATE};
55
use crate::rates::init::init_factory_rates;
66
use crate::types::state::{HeapState, ReleasesMetadata, State};
7-
use crate::upgrade::types::upgrade::UpgradeState;
87
use ciborium::{from_reader, into_writer};
98
use ic_cdk_macros::{init, post_upgrade, pre_upgrade};
109
use junobuild_shared::ic::api::caller;
@@ -51,12 +50,9 @@ fn post_upgrade() {
5150
let memory = get_memory_upgrades();
5251
let state_bytes = read_post_upgrade(&memory);
5352

54-
// TODO: remove once OpenIdProvider migrated on mainnet
55-
let upgrade_state: UpgradeState = from_reader(&*state_bytes)
53+
let state: State = from_reader(&*state_bytes)
5654
.expect("Failed to decode the state of the console in post_upgrade hook.");
5755

58-
let state: State = upgrade_state.into();
59-
6056
STATE.with(|s| *s.borrow_mut() = state);
6157

6258
defer_init_certified_assets();

src/console/src/types.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ pub mod ledger {
280280
#[derive(Clone)]
281281
pub enum Fee {
282282
Cycles(CyclesTokens),
283+
#[allow(clippy::upper_case_acronyms)]
283284
ICP(Tokens),
284285
}
285286
}

src/console/src/upgrade/impls.rs

Lines changed: 0 additions & 56 deletions
This file was deleted.

src/console/src/upgrade/mod.rs

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)