Skip to content

Commit

Permalink
Merge pull request #187 from valory-xyz/fix/timestamp
Browse files Browse the repository at this point in the history
Account for `None` opening timestamp
  • Loading branch information
Adamantios authored Dec 22, 2023
2 parents b9cec32 + 8ceb601 commit 9fbdca0
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 18 deletions.
12 changes: 6 additions & 6 deletions packages/packages.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"dev": {
"skill/valory/market_manager_abci/0.1.0": "bafybeih6jgq5ys442uxi6ezrnyfxasrlhjgivmz6ffoyf6illv3ofb6mjq",
"skill/valory/decision_maker_abci/0.1.0": "bafybeigufxcs2zdrp4g3s3rnpcdvjs4r7o7jkyd4yew4kl36pbo6qdqsby",
"skill/valory/trader_abci/0.1.0": "bafybeihxdgaobcf65rvm33cdxye5nupkaleltqgemy5qzqvrzcfhgg5koy",
"skill/valory/market_manager_abci/0.1.0": "bafybeievf7r6kz4z3hz2po6tkugjcmlk56xbrb5ixpoqb45evz57zjuuka",
"skill/valory/decision_maker_abci/0.1.0": "bafybeic63dvasakghgtxgjcrhviqlmkipr6rm52jmwxvx3k7iewvaxbwzy",
"skill/valory/trader_abci/0.1.0": "bafybeido6xxqc5s7wlaeipwbwch6jcpwtxkgvegozwbprqzfzf6cxihwnm",
"contract/valory/market_maker/0.1.0": "bafybeihcueo3ct3h5fqyrwsjeofr5winyxlnegnwdvofopwhrfzkhgpxte",
"agent/valory/trader/0.1.0": "bafybeid75kkpxtqqfrwtnmexambpllretawnx5mqahiqckuj6mzyyjav7m",
"service/valory/trader/0.1.0": "bafybeigkw6psapbe26jw5nole4c2nbuyhcfs5l7ds7ovetybnr7wwd6uxq",
"agent/valory/trader/0.1.0": "bafybeideojzh53zu4mp3z3duxpke2iomnbh6k2ig2bhwyeo53i6hjflfsy",
"service/valory/trader/0.1.0": "bafybeiemzzkhhvzfzm5kthiucryomynomnfqs6f24ttqawtgacd4c2z2hy",
"contract/valory/erc20/0.1.0": "bafybeiecuaahlywb2rw6s76av5rdqg4gad6j753to6aqrix7zmbbt6kj6q",
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeidqcoadcfzos7qdk64z6siurjexg7rtdpufxul7s5mbyctobzd7zm",
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeigxc2zgyyndtxfwvmv2xnafvhbh2ndnjj454vsjlt5f4n7ed45a7m",
"contract/valory/mech/0.1.0": "bafybeigmkbovcb6wcfqkkmmryo6kzqsai5qq325lzmsvtlxe4fn6rcmwoy",
"contract/valory/realitio/0.1.0": "bafybeic5ie4oodetj4krdogydvbfxg4qggc3matpiflocah626tpevpreq",
"contract/valory/realitio_proxy/0.1.0": "bafybeidx37xzjjmapwacedgzhum6grfzhp5vhouz4zu3pvpgdy5pgb2fr4",
Expand Down
8 changes: 4 additions & 4 deletions packages/valory/agents/trader/aea-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ skills:
- valory/reset_pause_abci:0.1.0:bafybeida6w2afp4m3dvnbkbwxz67ozjlry3wpsbkxwz7usalm3o2ghy46u
- valory/termination_abci:0.1.0:bafybeid5ipudhwuiuhbzvpn4usgdm3a3ow3naafuefvetmgbbcy6ugyuwi
- valory/transaction_settlement_abci:0.1.0:bafybeidsfwslnbhhhplvgteeec7idrhm7gxpay4f36wwnkgl4mh7ogovke
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeidqcoadcfzos7qdk64z6siurjexg7rtdpufxul7s5mbyctobzd7zm
- valory/market_manager_abci:0.1.0:bafybeih6jgq5ys442uxi6ezrnyfxasrlhjgivmz6ffoyf6illv3ofb6mjq
- valory/decision_maker_abci:0.1.0:bafybeigufxcs2zdrp4g3s3rnpcdvjs4r7o7jkyd4yew4kl36pbo6qdqsby
- valory/trader_abci:0.1.0:bafybeihxdgaobcf65rvm33cdxye5nupkaleltqgemy5qzqvrzcfhgg5koy
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeigxc2zgyyndtxfwvmv2xnafvhbh2ndnjj454vsjlt5f4n7ed45a7m
- valory/market_manager_abci:0.1.0:bafybeievf7r6kz4z3hz2po6tkugjcmlk56xbrb5ixpoqb45evz57zjuuka
- valory/decision_maker_abci:0.1.0:bafybeic63dvasakghgtxgjcrhviqlmkipr6rm52jmwxvx3k7iewvaxbwzy
- valory/trader_abci:0.1.0:bafybeido6xxqc5s7wlaeipwbwch6jcpwtxkgvegozwbprqzfzf6cxihwnm
- valory/staking_abci:0.1.0:bafybeihmfcd3kp2jwt4zznoxcwyutyqmfg6myi3buehtaznpq6qfcu4l6u
default_ledger: ethereum
required_ledgers:
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/services/trader/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: Apache-2.0
fingerprint:
README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq
fingerprint_ignore_patterns: []
agent: valory/trader:0.1.0:bafybeid75kkpxtqqfrwtnmexambpllretawnx5mqahiqckuj6mzyyjav7m
agent: valory/trader:0.1.0:bafybeideojzh53zu4mp3z3duxpke2iomnbh6k2ig2bhwyeo53i6hjflfsy
number_of_agents: 4
deployment: {}
---
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/skills/decision_maker_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protocols:
- valory/ipfs:0.1.0:bafybeiedxeismnx3k5ty4mvvhlqideixlhqmi5mtcki4lxqfa7uqh7p33u
skills:
- valory/abstract_round_abci:0.1.0:bafybeidbmd2cgffqqfwsyxws5dffsc6nbt5ijgkbhyzse5i42yddmwqlpy
- valory/market_manager_abci:0.1.0:bafybeih6jgq5ys442uxi6ezrnyfxasrlhjgivmz6ffoyf6illv3ofb6mjq
- valory/market_manager_abci:0.1.0:bafybeievf7r6kz4z3hz2po6tkugjcmlk56xbrb5ixpoqb45evz57zjuuka
- valory/transaction_settlement_abci:0.1.0:bafybeidsfwslnbhhhplvgteeec7idrhm7gxpay4f36wwnkgl4mh7ogovke
behaviours:
main:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ def get_condition_id_to_balances(
is_pending_arbitration = fpmm["isPendingArbitration"]
opening_timestamp = fpmm["openingTimestamp"]
market_status = MarketState.CLOSED
if fpmm["currentAnswer"] is None and time.time() >= float(opening_timestamp):
if (
fpmm["currentAnswer"] is None
and opening_timestamp is not None
and time.time() >= float(opening_timestamp)
):
market_status = MarketState.PENDING
elif fpmm["currentAnswer"] is None:
market_status = MarketState.OPEN
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/skills/market_manager_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fingerprint:
graph_tooling/queries/realitio.py: bafybeiftewjwk5fi6uqrhmalweun47voau2qkxi7hg3faxcmyy3va44zma
graph_tooling/queries/trades.py: bafybeigu6c25kf3mrlvmwjeskgagswdjnnxsygpriygmip44us4xvuf7ji
graph_tooling/requests.py: bafybeieki6p6d77hi3ewd2rd4kk43v5y7buqozjnhysxopbzo64n3zy3kq
graph_tooling/utils.py: bafybeib75lziydmni6fwqg2my63ioyor2gohe5pin62tu23at5p77nndni
graph_tooling/utils.py: bafybeidbbl32bofcierrwtw2mlwnqn3tgeg6i55cwkzg7vxpo27x2425si
handlers.py: bafybeihot2i2yvfkz2gcowvt66wdu6tkjbmv7hsmc4jzt4reqeaiuphbtu
models.py: bafybeifmb4cojxesv2lcw6j3pm3yqjpsiuwyxpuexjbz656fpapdqcj2ba
payloads.py: bafybeiamavgddfbzofpsjthmw6j7g2dyxm7fb6hvdb47kweyrx4w2ihcfi
Expand Down
6 changes: 3 additions & 3 deletions packages/valory/skills/trader_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ skills:
- valory/reset_pause_abci:0.1.0:bafybeida6w2afp4m3dvnbkbwxz67ozjlry3wpsbkxwz7usalm3o2ghy46u
- valory/transaction_settlement_abci:0.1.0:bafybeidsfwslnbhhhplvgteeec7idrhm7gxpay4f36wwnkgl4mh7ogovke
- valory/termination_abci:0.1.0:bafybeid5ipudhwuiuhbzvpn4usgdm3a3ow3naafuefvetmgbbcy6ugyuwi
- valory/market_manager_abci:0.1.0:bafybeih6jgq5ys442uxi6ezrnyfxasrlhjgivmz6ffoyf6illv3ofb6mjq
- valory/decision_maker_abci:0.1.0:bafybeigufxcs2zdrp4g3s3rnpcdvjs4r7o7jkyd4yew4kl36pbo6qdqsby
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeidqcoadcfzos7qdk64z6siurjexg7rtdpufxul7s5mbyctobzd7zm
- valory/market_manager_abci:0.1.0:bafybeievf7r6kz4z3hz2po6tkugjcmlk56xbrb5ixpoqb45evz57zjuuka
- valory/decision_maker_abci:0.1.0:bafybeic63dvasakghgtxgjcrhviqlmkipr6rm52jmwxvx3k7iewvaxbwzy
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeigxc2zgyyndtxfwvmv2xnafvhbh2ndnjj454vsjlt5f4n7ed45a7m
- valory/staking_abci:0.1.0:bafybeihmfcd3kp2jwt4zznoxcwyutyqmfg6myi3buehtaznpq6qfcu4l6u
behaviours:
main:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protocols:
- valory/ledger_api:1.0.0:bafybeige5agrztgzfevyglf7mb4o7pzfttmq4f6zi765y4g2zvftbyowru
skills:
- valory/abstract_round_abci:0.1.0:bafybeidbmd2cgffqqfwsyxws5dffsc6nbt5ijgkbhyzse5i42yddmwqlpy
- valory/decision_maker_abci:0.1.0:bafybeigufxcs2zdrp4g3s3rnpcdvjs4r7o7jkyd4yew4kl36pbo6qdqsby
- valory/decision_maker_abci:0.1.0:bafybeic63dvasakghgtxgjcrhviqlmkipr6rm52jmwxvx3k7iewvaxbwzy
- valory/staking_abci:0.1.0:bafybeihmfcd3kp2jwt4zznoxcwyutyqmfg6myi3buehtaznpq6qfcu4l6u
behaviours:
main:
Expand Down

0 comments on commit 9fbdca0

Please sign in to comment.