Ver código fonte

Fix nightly fmt (#1471)

* fix: nightly fmt ci

* chore: fmt
tsk 1 mês atrás
pai
commit
03b4cc5c97

+ 7 - 14
.github/workflows/nightly-rustfmt.yml

@@ -9,7 +9,7 @@ permissions: {}
 jobs:
   format:
     name: Nightly rustfmt
-    runs-on: ubuntu-latest
+    runs-on: self-hosted
     permissions:
       contents: write
       pull-requests: write
@@ -17,20 +17,13 @@ jobs:
       - uses: actions/checkout@v4
         with:
           ref: main
-      - name: Get flake hash
-        id: flake-hash
-        run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT
-      - name: Install Nix
-        uses: DeterminateSystems/nix-installer-action@v17
-      - name: Nix Cache
-        uses: DeterminateSystems/magic-nix-cache-action@main
-        with:
-          diagnostic-endpoint: ""
-          use-flakehub: false
-      - name: Rust Cache
-        uses: Swatinem/rust-cache@v2
+          token: ${{ secrets.BACKPORT_TOKEN }}
+      - uses: cachix/cachix-action@v16
         with:
-          shared-key: "nightly-${{ steps.flake-hash.outputs.hash }}"
+          name: cashudevkit
+          authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
+          useDaemon: false
+        continue-on-error: true
       - name: Run Nightly rustfmt
         run: |
           nix develop -i -L .#nightly --command bash -c '

+ 1 - 1
crates/cashu/src/nuts/nut18/payment_request.rs

@@ -268,7 +268,7 @@ mod tests {
     fn test_payment_request_builder() {
         let transport = Transport {
             _type: TransportType::Nostr,
-            target: "nprofile1qqsgm6qfa3c8dtz2fvzhvfqeacmwm0e50pe3k5tfmvpjjmn0vj7m2tgpz3mhxue69uhhyetvv9ujuerpd46hxtnfduq3wamnwvaz7tmjv4kxz7fw8qenxvewwdcxzcm99uqs6amnwvaz7tmwdaejumr0ds4ljh7n".to_string(), 
+            target: "nprofile1qqsgm6qfa3c8dtz2fvzhvfqeacmwm0e50pe3k5tfmvpjjmn0vj7m2tgpz3mhxue69uhhyetvv9ujuerpd46hxtnfduq3wamnwvaz7tmjv4kxz7fw8qenxvewwdcxzcm99uqs6amnwvaz7tmwdaejumr0ds4ljh7n".to_string(),
             tags: Some(vec![vec!["n".to_string(), "17".to_string()]])
         };
 

+ 4 - 4
crates/cdk-cln/src/lib.rs

@@ -178,11 +178,11 @@ impl MintPayment for Cln {
                             // We only want to yield invoices that have been paid
                             match wait_any_response.status {
                                 WaitanyinvoiceStatus::PAID => {
-                                    tracing::info!("CLN: Invoice with payment index {} is PAID", 
+                                    tracing::info!("CLN: Invoice with payment index {} is PAID",
                                                  wait_any_response.pay_index.unwrap_or_default());
                                 }
                                 WaitanyinvoiceStatus::EXPIRED => {
-                                    tracing::debug!("CLN: Invoice with payment index {} is EXPIRED, skipping", 
+                                    tracing::debug!("CLN: Invoice with payment index {} is EXPIRED, skipping",
                                                   wait_any_response.pay_index.unwrap_or_default());
                                     continue;
                                 }
@@ -213,7 +213,7 @@ impl MintPayment for Cln {
 
                             let amount_msats = match wait_any_response.amount_received_msat {
                                 Some(amt) => {
-                                    tracing::info!("CLN: Received payment of {} msats for {}", 
+                                    tracing::info!("CLN: Received payment of {} msats for {}",
                                                  amt.msat(), payment_hash);
                                     amt
                                 }
@@ -239,7 +239,7 @@ impl MintPayment for Cln {
                                     {
                                         Ok(Some(invoice)) => {
                                             if let Some(local_offer_id) = invoice.local_offer_id {
-                                                tracing::info!("CLN: Received bolt12 payment of {} msats for offer {}", 
+                                                tracing::info!("CLN: Received bolt12 payment of {} msats for offer {}",
                                                              amount_msats.msat(), local_offer_id);
                                                 PaymentIdentifier::OfferId(local_offer_id.to_string())
                                             } else {

+ 1 - 1
crates/cdk-common/src/error.rs

@@ -284,7 +284,7 @@ pub enum Error {
     TransferTimeout {
         /// Source mint URL
         source_mint: String,
-        /// Target mint URL  
+        /// Target mint URL
         target_mint: String,
         /// Amount that failed to transfer
         amount: Amount,