Ejemplo n.º 1
0
    def test_add_memo(self, test_data):
        builder = Builder(test_data.cold_secret, sequence=1, fee=100)

        builder.add_text_memo("hello")
        assert builder.memo == memo.TextMemo("hello")

        builder.add_id_memo(123123)
        assert builder.memo == memo.IdMemo(123123)

        hash = b"\x95\xe5\xbb\x95\x15\xd9\x9f\x82\x9d\xf9\x93\xc3'\x8e\xeb\xf1\nj!\xda\xa4\xa1\xe4\xf2<6cG}\x17\x97\xfe"
        builder.add_hash_memo(hash)
        assert builder.memo == memo.HashMemo(hash)
        builder.add_ret_hash_memo(hash)
        assert builder.memo == memo.RetHashMemo(hash)