Skip to content

Commit

Permalink
fix:
Browse files Browse the repository at this point in the history
replace redpacket graph url for op and arb
  • Loading branch information
cheng521521 committed Jul 30, 2024
1 parent a658e67 commit eb112e1
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/main/java/com/dl/officialsite/redpacket/RedPacketService.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,6 @@ private void updateRedpacketStatusByChainId(String chainId) throws IOException {
JsonArray lastupdatesArray = data.getAsJsonArray("lastupdates");
log.debug("lastupdatesArray" + lastupdatesArray.toString());

// todo
// if(lastupdatesArray.size() != 0){
// String lastTimestampFromGraph = lastupdatesArray.get(0).getAsJsonObject().get("lastupdateTimestamp").getAsString();
//
// if(Objects.equals(lastTimestampFromGraph, lastUpdateTimestampMap.get(chainId))){
// log.debug("chainId "+ chainId + "no event update");
// return ;
// } else {
// lastUpdateTimestampMap.put( chainId, lastTimestampFromGraph);
// log.debug("chainId "+ chainId + "set new event update: "+ lastTimestampFromGraph );
// }
// }

List<RedPacket> redPacketList = redPacketRepository.findUnfinishedRedpacketByChainId(chainId);

for (int i = 0; i < redpacketsArray.size(); i++) {
Expand Down Expand Up @@ -145,7 +132,7 @@ private HttpEntity getHttpEntityFromChain(String chainId) throws IOException {
switch (chainId) {
case Constants.CHAIN_ID_OP: // op
request = new HttpPost(
"http://production_site:8300/subgraphs/name/redpacket_optimism");
"http://103.99.179.200:8300/subgraphs/name/redpacket_optimism");
break;
// case Constants.CHAIN_ID_SEPOLIA: //sepolia
// request = new HttpPost(
Expand All @@ -157,7 +144,7 @@ private HttpEntity getHttpEntityFromChain(String chainId) throws IOException {
// break;
case Constants.CHAIN_ID_ARBITRUM: //arbitrum
request = new HttpPost(
"http://production_site:8400/subgraphs/name/redpacket_arbitrum");
"http://103.99.179.200:8400/subgraphs/name/redpacket_arbitrum");
break;
// case Constants.CHAIN_ID_ZKSYNC: //zksync
// request = new HttpPost(
Expand Down

0 comments on commit eb112e1

Please sign in to comment.