From f7a8b14bfbb0997336fd777c957119ee2a692269 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Tue, 8 Jun 2021 13:01:29 -0400 Subject: [PATCH] remove more references to libstatus stickers --- src/status/chat/stickers.nim | 4 ++-- src/status/stickers.nim | 8 +++++++- src/status/wallet/collectibles.nim | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/status/chat/stickers.nim b/src/status/chat/stickers.nim index de67610d00..30e6fe6ce6 100644 --- a/src/status/chat/stickers.nim +++ b/src/status/chat/stickers.nim @@ -1,9 +1,9 @@ import chronicles -import ../libstatus/stickers as libstatus_stickers +import ../stickers as status_stickers logScope: topics = "sticker-decoding" # TODO: this is for testing purposes, the correct function should decode the hash proc decodeContentHash*(value: string): string = - libstatus_stickers.decodeContentHash(value) \ No newline at end of file + status_stickers.decodeContentHash(value) diff --git a/src/status/stickers.nim b/src/status/stickers.nim index b6a7ffc220..141fd7bf3c 100644 --- a/src/status/stickers.nim +++ b/src/status/stickers.nim @@ -136,4 +136,10 @@ proc addStickerToRecent*(self: StickersModel, sticker: Sticker, save: bool = fal if self.recentStickers.len > 24: self.recentStickers = self.recentStickers[0..23] # take top 24 most recent if save: - status_stickers.saveRecentStickers(self.recentStickers) \ No newline at end of file + status_stickers.saveRecentStickers(self.recentStickers) + +proc decodeContentHash*(value: string): string = + result = status_stickers.decodeContentHash(value) + +proc getPackIdFromTokenId*(tokenId: Stuint[256]): int = + result = status_stickers.getPackIdFromTokenId(tokenId) diff --git a/src/status/wallet/collectibles.nim b/src/status/wallet/collectibles.nim index 900d4eeb95..9887667b49 100644 --- a/src/status/wallet/collectibles.nim +++ b/src/status/wallet/collectibles.nim @@ -7,7 +7,7 @@ import # vendor libs import # status-desktop libs ../libstatus/core as status, ../libstatus/eth/contracts as contracts, - ../libstatus/stickers as status_stickers, ../types, + ../stickers as status_stickers, ../types, web3/[conversions, ethtypes], ../utils, account const CRYPTOKITTY* = "cryptokitty"