Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing some unwraps to cool down my mind #336

Merged
merged 3 commits into from
Aug 6, 2024
Merged

Removing some unwraps to cool down my mind #336

merged 3 commits into from
Aug 6, 2024

Conversation

arkanoider
Copy link
Collaborator

@grunch

just some unwrap removal, I know you like it...just to relax myself.

NOT TESTED.

Copy link
Collaborator

@Catrya Catrya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @arkanoider after completing a trade and publish a new order I get this error if I try to do listorders:

You are searching orders with status Pending
Requesting orders from mostro pubId - my_mostro_pubkey 
thread 'main' panicked at src/nip33.rs:12:26:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Neither my Mostro nor the relay have stopped and events 38383 are still being published correctly. I don't see anything weird in the logs either.

@arkanoider
Copy link
Collaborator Author

This comes from Mostro-cli @Catrya ?

@Catrya
Copy link
Collaborator

Catrya commented Aug 1, 2024

This comes from Mostro-cli @Catrya ?

I used mostro-cli, the same version that I have been using for a time

@arkanoider
Copy link
Collaborator Author

Maybe I broke something...you cannot get the list anymore now? But you can publish order?

@Catrya
Copy link
Collaborator

Catrya commented Aug 1, 2024

Maybe I broke something...you cannot get the list anymore now? But you can publish order?

Exactly. And I can see my DMs, etc.
Just can't get the list

@arkanoider
Copy link
Collaborator Author

Ok will check. Could you please copy here the log from mostrod when you create an order?

@Catrya
Copy link
Collaborator

Catrya commented Aug 1, 2024

Ok, lo comprobaré. ¿Podrías copiar aquí el registro de mostrod cuando creas un pedido?

2024-08-01T20:58:02.661426Z  INFO mostrod::util: Publishing Event Id: 9308cb8a4a1e57640224908b45df40674bb397181cd7f52c1e49ac1c9f8c3ba8 for Order Id: 101ad60b-de06-4036-98fc-41e62206b288
2024-08-01T20:58:02.662184Z  INFO mostrod::util: DM content: "{\"order\":{\"version\":1,\"id\":\"101ad60b-de06-4036-98fc-41e62206b288\",\"pubkey\":null,\"action\":\"new-order\",\"content\":{\"order\":{\"id\":\"101ad60b-de06-4036-98fc-41e62206b288\",\"kind\":\"sell\",\"status\":\"pending\",\"amount\":500,\"fiat_code\":\"CUP\",\"min_amount\":null,\"max_amount\":null,\"fiat_amount\":5,\"payment_method\":\"listorders\",\"premium\":0,\"created_at\":1722545882,\"expires_at\":1722632282}}}}"
2024-08-01T20:58:02.663909Z  INFO mostrod::util: Sending event: Event {
    id: EventId(
        [
            47,
            197,
            247,
            248,
            230,
            46,
            182,
            148,
            6,
            112,
            100,
            59,
            173,
            198,
            62,
            234,
            215,
            182,
            52,
            80,
            95,
            143,
            209,
            8,
            198,
            178,
            229,
            79,
            175,
            24,
            31,
            106,
        ],
    ),
    pubkey: PublicKey(
        [
            0,
            0,
            0,
            24,
            193,
            174,
            49,
            71,
            249,
            1,
            11,
            93,
            118,
            142,
            194,
            177,
            33,
            172,
            241,
            166,
            127,
            35,
            139,
            232,
            226,
            189,
            215,
            193,
            249,
            238,
            247,
            5,
        ],
    ),
    created_at: Timestamp(
        1722545882,
    ),
    kind: EncryptedDirectMessage,
    tags: [
        Tag {
            buf: [
                "p",
                "0002253f9777bb902e322fdb07b62356cc5f1bfc6018987710d5196c0c3be6f4",
            ],
            standardized: OnceCell(Uninit),
        },
    ],
    content: "yLPievEKAq/E7GfJPDVxjjRoAw9XQ7Fs7zHfPW0uR2wWYqPPLKLRFlZ9GX21qdDw9AAyxW00VDR75zUZmvdb44jL1lH37bJvTlr5lDkfjF91BsUSiNYhyL04x7k5SdPjfSYSyejfL3xWad6EkOsmc3TBayt/Y/QsGbCBm5mj8f7PGKsENC6/1Q7mJGtD8qHGjVXVy0hUNMTT7sct8uwtY0pZhv3Mc4TqNA3Ath7ypoMxLiiNuCoUlK68U+tRrGSFpIEt/tsyEU63EezgCQLlyU8ZY4tVu0oXyUrB0stJy2fdFn4vtaYTU8aXDNhn+RZKR9bfPb7hoJArYZyzUa1nUVZbmY2s3+ROARk83vEJKdtfyLzJlScijCmwbtBqgGeju0dKC1LrRYx3uQLwlxwGbTM9+VhrHfwJhZlWnXiRJBM8aWrJ+K+2cPft5nzI44unMZqodtEa8Sa9P4TAeh4w7IsZxKdaWV/e2XpgJaePisXNyCFZSfAZBIQYGWpYftco?iv=IvL42LDLqKOtpXnxmCoknQ==",
    sig: Signature(65bd49a9528e03866e2b2a3c2e39e5f016ba92cb32b72f144d2276e20868cc0f83b0d0fb8ab9b85efb79f6226e056fe30125e4e9dbedf6e555e25feca2016a43),
}
2024-08-01T20:58:18.769898Z  INFO mostrod::scheduler: I run async every 30 minutes - update rate event of users

@arkanoider
Copy link
Collaborator Author

Are you on latest commit of Mostro-Cli @Catrya ?

This:

abda6bc35c86eb728e97fac6dc3360a7f751310f

@Catrya
Copy link
Collaborator

Catrya commented Aug 2, 2024

Are you on latest commit of Mostro-Cli @Catrya ?

This:

abda6bc35c86eb728e97fac6dc3360a7f751310f

@arkanoider , yes, I'm on the last commit of mostro-cli

@grunch
Copy link
Member

grunch commented Aug 2, 2024

I tested it and I had the exact same issue reported here

Copy link
Collaborator

@Catrya Catrya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it works!

@grunch grunch merged commit a5a8f76 into main Aug 6, 2024
1 check passed
@arkanoider arkanoider deleted the remove-unwraps branch August 6, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants