Skip to content

Commit 2c186aa

Browse files
committed
remove node address and token
1 parent e95b38d commit 2c186aa

File tree

5 files changed

+0
-40
lines changed

5 files changed

+0
-40
lines changed

fplus-database/src/database/mod.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ pub async fn get_allocators() ->Result<Vec<AllocatorModel>, sea_orm::DbErr> {
2222
* @param installation_id: Option<i64> - The installation ID
2323
* @param multisig_address: Option<String> - The multisig address
2424
* @param verifiers_gh_handles: Option<String> - The GitHub handles of the verifiers
25-
* @param node_address: Option<String> - The node address
26-
* @param node_token: Option<String> - The node token
2725
*
2826
* # Returns
2927
* @return Result<AllocatorModel, sea_orm::DbErr> - The result of the operation
@@ -34,8 +32,6 @@ pub async fn update_allocator(
3432
installation_id: Option<i64>,
3533
multisig_address: Option<String>,
3634
verifiers_gh_handles: Option<String>,
37-
node_address: Option<String>,
38-
node_token: Option<String>,
3935
) -> Result<AllocatorModel, sea_orm::DbErr> {
4036
let conn = get_database_connection().await?;
4137

@@ -46,8 +42,6 @@ pub async fn update_allocator(
4642
allocator_active_model.installation_id = Set(installation_id);
4743
allocator_active_model.multisig_address = Set(multisig_address);
4844
allocator_active_model.verifiers_gh_handles = Set(verifiers_gh_handles);
49-
allocator_active_model.node_address = Set(node_address);
50-
allocator_active_model.node_token = Set(node_token);
5145

5246
let updated_model = allocator_active_model.update(&conn).await?;
5347

@@ -88,8 +82,6 @@ pub async fn get_allocator(
8882
* @param installation_id: Option<i64> - The installation ID
8983
* @param multisig_address: Option<String> - The multisig address
9084
* @param verifiers_gh_handles: Option<String> - The GitHub handles of the verifiers
91-
* @param node_address: Option<String> - The node address
92-
* @param node_token: Option<String> - The node token
9385
*
9486
* # Returns
9587
* @return Result<AllocatorModel, sea_orm::DbErr> - The result of the operation
@@ -100,8 +92,6 @@ pub async fn create_or_update_allocator(
10092
installation_id: Option<i64>,
10193
multisig_address: Option<String>,
10294
verifiers_gh_handles: Option<String>,
103-
node_address: Option<String>,
104-
node_token: Option<String>,
10595
) -> Result<AllocatorModel, sea_orm::DbErr> {
10696

10797
let existing_allocator = get_allocator(&owner, &repo).await?;
@@ -112,8 +102,6 @@ pub async fn create_or_update_allocator(
112102
allocator_active_model.installation_id = Set(installation_id);
113103
allocator_active_model.multisig_address = Set(multisig_address);
114104
allocator_active_model.verifiers_gh_handles = Set(verifiers_gh_handles);
115-
allocator_active_model.node_address = Set(node_address);
116-
allocator_active_model.node_token = Set(node_token);
117105

118106
let updated_model = allocator_active_model.update(&conn).await?;
119107

@@ -125,8 +113,6 @@ pub async fn create_or_update_allocator(
125113
installation_id: Set(installation_id),
126114
multisig_address: Set(multisig_address),
127115
verifiers_gh_handles: Set(verifiers_gh_handles),
128-
node_address: Set(node_address),
129-
node_token: Set(node_token),
130116
..Default::default()
131117
};
132118

fplus-database/src/lib.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,13 @@ mod tests {
102102
let installation_id = Some(1234);
103103
let multisig_address = Some("0x1234567890".to_string());
104104
let verifiers_gh_handles = Some("test_verifier_1, test_verifier_2".to_string());
105-
let node_address = Some("wss://lotus-node-1.ngrok-free.app/rpc/v0".to_string());
106-
let node_token = Some("222".to_string());
107105

108106
let result = database::create_or_update_allocator(
109107
owner,
110108
repo,
111109
installation_id,
112110
multisig_address,
113111
verifiers_gh_handles,
114-
node_address,
115-
node_token
116112
).await;
117113
assert!(result.is_ok());
118114
}
@@ -153,17 +149,13 @@ mod tests {
153149
let multisig_address = Some
154150
("0x1234567890".to_string());
155151
let verifiers_gh_handles = Some("test_verifier_1, test_verifier_2".to_string());
156-
let node_address = Some("wss://lotus-node.app/rpc/v0".to_string());
157-
let node_token = Some("111".to_string());
158152

159153
let result = database::create_or_update_allocator(
160154
owner.clone(),
161155
repo.clone(),
162156
installation_id,
163157
multisig_address,
164158
verifiers_gh_handles,
165-
node_address,
166-
node_token
167159
).await;
168160
assert!(result.is_ok());
169161
}
@@ -173,17 +165,13 @@ mod tests {
173165
let installation_id = Some(1234);
174166
let multisig_address = Some("0x0987654321".to_string());
175167
let verifiers_gh_handles = Some("test_verifier_3, test_verifier_4".to_string());
176-
let node_address = Some("wss://lotus-node.app/rpc/v0".to_string());
177-
let node_token = Some("111".to_string());
178168

179169
let result = database::update_allocator(
180170
&owner,
181171
&repo,
182172
installation_id,
183173
multisig_address,
184174
verifiers_gh_handles,
185-
node_address,
186-
node_token
187175
).await;
188176
assert!(result.is_ok());
189177
}
@@ -228,17 +216,13 @@ mod tests {
228216
let installation_id = Some(1234);
229217
let multisig_address = Some("0x1234567890".to_string());
230218
let verifiers_gh_handles = Some("test_verifier_1, test_verifier_2".to_string());
231-
let node_address = Some("wss://lotus-node-2.ngrok-free.app/rpc/v0".to_string());
232-
let node_token = Some("333".to_string());
233219

234220
let result = database::create_or_update_allocator(
235221
owner.clone(),
236222
repo.clone(),
237223
installation_id,
238224
multisig_address,
239225
verifiers_gh_handles,
240-
node_address,
241-
node_token
242226
).await;
243227

244228
assert!(result.is_ok());

fplus-database/src/models/allocators.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ pub struct Model {
1414
pub multisig_address: Option<String>,
1515
#[sea_orm(column_type = "Text", nullable)]
1616
pub verifiers_gh_handles: Option<String>,
17-
pub node_address: Option<String>,
18-
pub node_token: Option<String>,
1917
}
2018

2119
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]

fplus-http-server/src/router/allocator.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ pub async fn create_or_update(info: web::Json<Allocator>) -> impl Responder {
3737
info.installation_id,
3838
info.multisig_address.clone(),
3939
info.verifiers_gh_handles.clone(),
40-
info.node_address.clone(),
41-
info.node_token.clone(),
4240
).await {
4341
Ok(allocator_model) => HttpResponse::Ok().json(allocator_model),
4442
Err(e) => {
@@ -72,8 +70,6 @@ pub async fn update(
7270
info.installation_id,
7371
info.multisig_address.clone(),
7472
info.verifiers_gh_handles.clone(),
75-
info.node_address.clone(),
76-
info.node_token.clone(),
7773
).await {
7874
Ok(allocator_model) => HttpResponse::Ok().json(allocator_model),
7975
Err(e) => {

fplus-lib/src/core/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,13 @@ pub struct Allocator {
9898
pub installation_id: Option<i64>,
9999
pub multisig_address: Option<String>,
100100
pub verifiers_gh_handles: Option<String>,
101-
pub node_address: Option<String>,
102-
pub node_token: Option<String>,
103101
}
104102

105103
#[derive(Deserialize)]
106104
pub struct AllocatorUpdateInfo {
107105
pub installation_id: Option<i64>,
108106
pub multisig_address: Option<String>,
109107
pub verifiers_gh_handles: Option<String>,
110-
pub node_address: Option<String>,
111-
pub node_token: Option<String>,
112108
}
113109

114110
#[derive(Deserialize)]

0 commit comments

Comments
 (0)