Skip to content

Instantly share code, notes, and snippets.

@Art3miX
Art3miX / vue-tour-highlight.js
Last active July 19, 2019 14:47
The code to add a highlight to the element for vue-tour
/**
* TOUR_ACTIVE_CLASS - The class for the active step element
* BODY_TOUR - The class we add to the body to show the tour is active for click events.
*/
const TOUR_ACTIVE_CLASS = 'tour-active',
BODY_TOUR = 'in-tour';
module.exports = {
tourMixin: {
data() {
@Art3miX
Art3miX / update_storage.rs
Last active February 7, 2023 11:09
Easy way to update your storage manually in cw-multi-test.
// Long story short, IBC is not support with cw_multi_test, and I have a storage that is updaing based on some IBC call
// Because I can't mock the IBC call, I had to update the storage manually, heres a little helper to do so.
pub fn update_storage(app: &mut App, address: &[u8], function: &mut dyn FnMut(&mut PrefixedStorage)) {
app.init_modules(|_, _, storage| {
let mut namespace = b"contract_data/".to_vec();
namespace.extend_from_slice(address);
let mut prefixed_storage = PrefixedStorage::multilevel(storage, &[b"wasm", &namespace]);