Skip to content

Commit

Permalink
chore(cargo): Update warp dependency (#1935)
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusc93 authored Mar 22, 2024
1 parent f93fc7a commit c1161e5
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 103 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ui-test-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: Satellite-im/Warp
ref: d15be5735c5e654bbb7b424d0ea2c414df8b5e4c
ref: b574da4ab10cfd7bf38ec0e2b499232a2e8f8eff

- name: Set up cargo cache 🛠️
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -205,7 +205,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: Satellite-im/Warp
ref: d15be5735c5e654bbb7b424d0ea2c414df8b5e4c
ref: b574da4ab10cfd7bf38ec0e2b499232a2e8f8eff
path: "./warp"

- name: Download Key file 🗳️
Expand Down Expand Up @@ -338,7 +338,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: Satellite-im/Warp
ref: d15be5735c5e654bbb7b424d0ea2c414df8b5e4c
ref: b574da4ab10cfd7bf38ec0e2b499232a2e8f8eff
path: "./warp"

- name: Download Key file 🗳️
Expand Down Expand Up @@ -483,7 +483,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: Satellite-im/Warp
ref: d15be5735c5e654bbb7b424d0ea2c414df8b5e4c
ref: b574da4ab10cfd7bf38ec0e2b499232a2e8f8eff
path: "./warp"

- name: Download Key file 🗳️
Expand Down
102 changes: 12 additions & 90 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ arboard = "3.3"
humansize = "2.1.3"
uuid = { version = "1", features = ["serde", "v4"] }
libloading = "0.8.3"
warp = { git = "https://github.com/Satellite-im/Warp", rev = "d15be5735c5e654bbb7b424d0ea2c414df8b5e4c" }
warp-ipfs = { git = "https://github.com/Satellite-im/Warp", rev = "d15be5735c5e654bbb7b424d0ea2c414df8b5e4c" }
warp-blink-wrtc = { git = "https://github.com/Satellite-im/Warp", rev = "d15be5735c5e654bbb7b424d0ea2c414df8b5e4c" }
warp = { git = "https://github.com/Satellite-im/Warp", rev = "b574da4ab10cfd7bf38ec0e2b499232a2e8f8eff" }
warp-ipfs = { git = "https://github.com/Satellite-im/Warp", rev = "b574da4ab10cfd7bf38ec0e2b499232a2e8f8eff" }
warp-blink-wrtc = { git = "https://github.com/Satellite-im/Warp", rev = "b574da4ab10cfd7bf38ec0e2b499232a2e8f8eff" }
rfd = "0.14.0"
mime = "0.3.17"
serde = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ pub static WARP_EVENT_CH: Lazy<WarpEventChannels> = Lazy::new(|| {
WarpEventChannels { tx, _rx }
});

pub const MAX_FILES_PER_MESSAGE: usize = 8;
pub const MAX_FILES_PER_MESSAGE: usize = 32;

pub const ROOT_DIR_NAME: &str = "root";

Expand Down
2 changes: 1 addition & 1 deletion common/src/warp_runner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ impl From<&DiscoveryMode> for Discovery {
.unwrap_or_default();

let addresses = match env_addrs.is_empty() {
true => Vec::from_iter(["/ip4/104.236.194.35/tcp/34053/p2p/12D3KooWJSes8386p2T1sMeZ2DzsNJThKkZWbj4US6uPMpEgBTHu"
true => Vec::from_iter(["/ip4/159.65.41.31/tcp/8848/p2p/12D3KooWRF2bz3KDRPvBs1FASRDRk7BfdYc1RUcfwKsz7UBEu7mL"
.parse()
.expect("valid addr")]),
false => env_addrs
Expand Down
2 changes: 1 addition & 1 deletion ui/src/utils/async_task_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ pub fn chat_upload_stream_handler(
}
return;
}
AttachmentKind::AttachedProgress(progress) => {
AttachmentKind::AttachedProgress(_, progress) => {
let progress = progress.into();
if let Err(e) = WARP_EVENT_CH.tx.send(WarpEvent::Message(
MessageEvent::AttachmentProgress {
Expand Down
4 changes: 2 additions & 2 deletions utils/replace_node.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ $modRsFilePath = ".\common\src\warp_runner\mod.rs"
$modRsContent = Get-Content -Path $modRsFilePath -Raw

# Replace the old address with the new address in the mod.rs content
$newModRsContentFirst = $modRsContent -replace "/ip4/104.236.194.35/tcp/34053/", "/ip4/127.0.0.1/tcp/4444/"
$newModRsContentFirst = $modRsContent -replace "/ip4/159.65.41.31/tcp/8848/", "/ip4/127.0.0.1/tcp/4444/"

# Set the new address based on the content of peerID.txt
$peerIDFilePath = ".\warp\peerID.txt"
$newPeerID = (Get-Content -Path $peerIDFilePath | Select-String -Pattern '/ip4/\d+\.\d+\.\d+\.\d+/tcp/\d+/p2p/(\S+)').Matches.Groups[1].Value

# Define the old address to be replaced
$oldPeerId = "12D3KooWJSes8386p2T1sMeZ2DzsNJThKkZWbj4US6uPMpEgBTHu"
$oldPeerId = "12D3KooWRF2bz3KDRPvBs1FASRDRk7BfdYc1RUcfwKsz7UBEu7mL"

# Replace the old address with the new address in the mod.rs content
$newModRsContentTwo = $newModRsContentFirst -replace $oldPeerId, $newPeerID
Expand Down
2 changes: 1 addition & 1 deletion utils/replace_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
local_peer_id=$(grep -o 'Local PeerID: [^[:space:]]*' ./warp/peerID.txt | awk '{print $NF}')

# Update the values in ./common/src/warp_runner/mod.rs and store in a temporary file
sed -e "s#/ip4/104.236.194.35/tcp/34053/p2p/12D3KooWJSes8386p2T1sMeZ2DzsNJThKkZWbj4US6uPMpEgBTHu#/ip4/127.0.0.1/tcp/4444/p2p/$local_peer_id#" ./common/src/warp_runner/mod.rs > temp_file
sed -e "s#/ip4/159.65.41.31/tcp/8848/p2p/12D3KooWRF2bz3KDRPvBs1FASRDRk7BfdYc1RUcfwKsz7UBEu7mL#/ip4/127.0.0.1/tcp/4444/p2p/$local_peer_id#" ./common/src/warp_runner/mod.rs > temp_file

# Replace the original mod.rs with the modified content
mv temp_file ./common/src/warp_runner/mod.rs

0 comments on commit c1161e5

Please sign in to comment.